Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply review comments
Browse files Browse the repository at this point in the history
Carlos Pérez-Aradros Herce committed Nov 13, 2018
1 parent 2a5a1b1 commit 7ef8bc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libbeat/autodiscover/autodiscover.go
Original file line number Diff line number Diff line change
@@ -137,7 +137,7 @@ func (a *Autodiscover) worker() {
logp.Debug(debugK, "Reloading existing autodiscover configs after error")
}

configs := make([]*reload.ConfigWithMeta, 0, len(a.configs))
configs := []*reload.ConfigWithMeta{}
for _, list := range a.configs {
for _, c := range list {
configs = append(configs, c)
@@ -161,7 +161,7 @@ func (a *Autodiscover) handleStart(event bus.Event) bool {

eventID := getID(event)
if eventID == "" {
logp.Err("Event didn't provide instance id, ignoring it")
logp.Err("Event didn't provide instance id: %+v, ignoring it", event)
return false
}

@@ -215,7 +215,7 @@ func (a *Autodiscover) handleStop(event bus.Event) bool {
logp.Debug(debugK, "Got a stop event: %v", event)
eventID := getID(event)
if eventID == "" {
logp.Err("Event didn't provide instance id, ignoring it")
logp.Err("Event didn't provide instance id: %+v, ignoring it", event)
return false
}

0 comments on commit 7ef8bc6

Please sign in to comment.