1
0
Fork 0

Update to go1.21

This commit is contained in:
Ludovic Fernandez 2023-08-16 17:50:06 +02:00 committed by GitHub
parent 57780d8004
commit f29325c679
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 59 additions and 67 deletions

View file

@ -3,6 +3,7 @@ package runtime
import (
"context"
"fmt"
"slices"
"github.com/traefik/traefik/v2/pkg/config/dynamic"
"github.com/traefik/traefik/v2/pkg/log"
@ -17,7 +18,7 @@ func (c *Configuration) GetTCPRoutersByEntryPoints(ctx context.Context, entryPoi
entryPointsCount := 0
for _, entryPointName := range rt.EntryPoints {
if !contains(entryPoints, entryPointName) {
if !slices.Contains(entryPoints, entryPointName) {
rt.AddError(fmt.Errorf("entryPoint %q doesn't exist", entryPointName), false)
logger.WithField(log.EntryPointName, entryPointName).
Errorf("entryPoint %q doesn't exist", entryPointName)