Skip to content

Commit

Permalink
Arrange all values into a map of maps rather than an array
Browse files Browse the repository at this point in the history
  • Loading branch information
eskibars committed Apr 30, 2016
1 parent e5be463 commit 0b32510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beater/wmibeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func (bt *Wmibeat) Run(b *beat.Beat) error {
service := serviceObj.ToIDispatch()
defer serviceObj.Clear()

var allValues []common.MapStr
var allValues common.MapStr
for _, class := range bt.beatConfig.Wmibeat.Classes {
if len(class.Fields) > 0 {
var query bytes.Buffer
Expand Down Expand Up @@ -156,7 +156,7 @@ func (bt *Wmibeat) Run(b *beat.Beat) error {
}
rowValues = nil
}
allValues = append(allValues, common.MapStr { class.Class: classValues })
allValues = common.MapStrUnion(allValues, common.MapStr { class.Class: classValues })
classValues = nil

} else {
Expand Down

0 comments on commit 0b32510

Please sign in to comment.