Skip to content

Commit

Permalink
Fix prepare keys for patternkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
demdxx committed Sep 8, 2024
1 parent d7d9503 commit d9d69ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/patternkey/patternkeys_values.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func PatternKeysFrom(values ...string) *PatterKeys {

// Prepare values by message
func (tags *PatterKeys) Prepare(msg message.Message) []string {
if tags == nil || len(tags.keys) == 0 {
return nil
}
vals := make([]string, 0, len(tags.keys))
for _, tag := range tags.keys {
vals = append(vals, tag.Prepare(msg))
Expand Down

0 comments on commit d9d69ed

Please sign in to comment.