@@ -20,6 +20,7 @@ import (
2020 "context"
2121 "errors"
2222 "fmt"
23+ "slices"
2324 "strings"
2425 "time"
2526
@@ -199,7 +200,7 @@ func (s *composeService) watchContainers(ctx context.Context, //nolint:gocyclo
199200 ofInterest := func (c containerType.Summary ) bool {
200201 if len (services ) > 0 {
201202 // we only watch some services
202- return utils .Contains (services , c .Labels [api .ServiceLabel ])
203+ return slices .Contains (services , c .Labels [api .ServiceLabel ])
203204 }
204205 return true
205206 }
@@ -208,7 +209,7 @@ func (s *composeService) watchContainers(ctx context.Context, //nolint:gocyclo
208209 isRequired := func (c containerType.Summary ) bool {
209210 if len (services ) > 0 && len (required ) > 0 {
210211 // we only watch some services
211- return utils .Contains (required , c .Labels [api .ServiceLabel ])
212+ return slices .Contains (required , c .Labels [api .ServiceLabel ])
212213 }
213214 return true
214215 }
@@ -263,7 +264,7 @@ func (s *composeService) watchContainers(ctx context.Context, //nolint:gocyclo
263264 }
264265 if _ , ok := watched [container .ID ]; ok {
265266 eType := api .ContainerEventStopped
266- if utils .Contains (replaced , container .ID ) {
267+ if slices .Contains (replaced , container .ID ) {
267268 utils .Remove (replaced , container .ID )
268269 eType = api .ContainerEventRecreated
269270 }
@@ -290,7 +291,7 @@ func (s *composeService) watchContainers(ctx context.Context, //nolint:gocyclo
290291 }
291292
292293 eType := api .ContainerEventExit
293- if utils .Contains (replaced , container .ID ) {
294+ if slices .Contains (replaced , container .ID ) {
294295 utils .Remove (replaced , container .ID )
295296 eType = api .ContainerEventRecreated
296297 }
0 commit comments