Skip to content

Commit

Permalink
Merge pull request #6 from AcidSailor/main
Browse files Browse the repository at this point in the history
fix(outputs): AddSubscriptionTarget correct return with empty addTarget
  • Loading branch information
karimra authored Nov 8, 2022
2 parents b88c9fc + df630f5 commit bad7879
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions outputs/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ func DecodeConfig(src, dst interface{}) error {

func AddSubscriptionTarget(msg proto.Message, meta Meta, addTarget string, tpl *template.Template) (*gnmi.SubscribeResponse, error) {
if addTarget == "" {
if message, ok := msg.(*gnmi.SubscribeResponse); ok {
return message, nil
}
return nil, nil
}
msg = proto.Clone(msg)
Expand Down

0 comments on commit bad7879

Please sign in to comment.