Skip to content

Commit

Permalink
fix: output name as text when no event data is present
Browse files Browse the repository at this point in the history
  • Loading branch information
akurilov committed Feb 8, 2024
1 parent adfe54c commit 59402f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/messages/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (f Format) convert(evt *pb.CloudEvent, subDescr string, mode FormatMode, tr
}
attrName, attrNameFound := evt.Attributes["name"]
if txt == "" && attrNameFound {
txt = attrName.GetCeString()
txt = fmt.Sprintf("%s\n\n", attrName.GetCeString())
}
txt += fmt.Sprintf("Subscription: %s\n\nsource: %s\n", subDescr, evt.Source)
var attrsTxt string
Expand Down

0 comments on commit 59402f4

Please sign in to comment.