Skip to content

Commit

Permalink
fix variable
Browse files Browse the repository at this point in the history
  • Loading branch information
kvch committed Aug 27, 2018
1 parent 03ee796 commit 496ebe4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions filebeat/reader/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ func (m *Message) AddFields(fields common.MapStr) {
return
}

if msg.Fields == nil {
msg.Fields = common.MapStr{}
if m.Fields == nil {
m.Fields = common.MapStr{}
}
msg.Fields.Update(fields)
m.Fields.Update(fields)
}

// AddTagsWithKey adds tags to the message with an arbitrary key.
Expand All @@ -68,9 +68,9 @@ func (m *Message) AddTagsWithKey(key string, tags []string) error {
return nil
}

if msg.Fields == nil {
msg.Fields = common.MapStr{}
if m.Fields == nil {
m.Fields = common.MapStr{}
}

return common.AddTagsWithKey(msg.Fields, key, tags)
return common.AddTagsWithKey(m.Fields, key, tags)
}

0 comments on commit 496ebe4

Please sign in to comment.