From 5a856c98aa89cc004969e4680a83eaabfff227e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Carreira?= Date: Fri, 20 Nov 2020 10:43:28 +0000 Subject: [PATCH] Use strings.HasPrefix instead of manual count of prefix --- pkg/router/appmesh_v1beta2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/router/appmesh_v1beta2.go b/pkg/router/appmesh_v1beta2.go index e5248577..248da14b 100644 --- a/pkg/router/appmesh_v1beta2.go +++ b/pkg/router/appmesh_v1beta2.go @@ -105,7 +105,7 @@ func (ar *AppMeshv1beta2Router) reconcileVirtualNode(canary *flaggerv1.Canary, n backends := make([]appmeshv1.Backend, 0) for _, b := range canary.Spec.Service.Backends { var bk appmeshv1.Backend - if b[:6] == "arn:aws" { + if strings.HasPrefix(b, "arn:aws") { bk = appmeshv1.Backend{ VirtualService: appmeshv1.VirtualServiceBackend{ VirtualServiceARN: &b,