Skip to content

Commit 473108c

Browse files
authored
Merge pull request #672 from sakanjo/main
chore: use Contains instead of Index
2 parents 4c4510d + 0c16718 commit 473108c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: internal/generator/generator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func (g *generator) generateFromEvents() {
281281
time.Sleep(10 * time.Second)
282282
break
283283
}
284-
if event.Status == "start" || event.Status == "stop" || event.Status == "die" || strings.Index(event.Status, "health_status:") != -1 {
284+
if event.Status == "start" || event.Status == "stop" || event.Status == "die" || strings.Contains(event.Status, "health_status:") {
285285
log.Printf("Received event %s for container %s", event.Status, event.ID[:12])
286286
// fanout event to all watchers
287287
for _, watcher := range watchers {

0 commit comments

Comments
 (0)