From 35a784a0962a64816c5da601e69da17b2b0529fe Mon Sep 17 00:00:00 2001 From: Berk Dehrioglu Date: Tue, 21 Nov 2023 12:38:32 +0300 Subject: [PATCH] fix go lint error --- pkg/registrar/transitgateway.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/registrar/transitgateway.go b/pkg/registrar/transitgateway.go index 2d777c4..b79615f 100644 --- a/pkg/registrar/transitgateway.go +++ b/pkg/registrar/transitgateway.go @@ -26,6 +26,7 @@ import ( type contextKey string var clusterNameContextKey contextKey = "clusterName" +var tagKey = "tag:" const ( // PREFIX_LIST_MAX_ENTRIES is the maximum number of entries a created prefix list can have. @@ -735,9 +736,9 @@ func (r *TransitGateway) getTGWGAttachmentSubnetsOrDefault(ctx context.Context, result := make([]string, 0) output, err := transitGatewayClient.DescribeSubnets(ctx, &ec2.DescribeSubnetsInput{ Filters: []types.Filter{ - {Name: awssdk.String("tag:" + capa.NameKubernetesAWSCloudProviderPrefix + awsCluster.Name), Values: []string{"owned", "shared"}}, - {Name: awssdk.String("tag:" + SubnetTGWAttachementsLabel), Values: []string{"true"}}, - {Name: awssdk.String("tag:" + SubnetRoleLabel), Values: []string{"private"}}, + {Name: awssdk.String(tagKey + capa.NameKubernetesAWSCloudProviderPrefix + awsCluster.Name), Values: []string{"owned", "shared"}}, + {Name: awssdk.String(tagKey + SubnetTGWAttachementsLabel), Values: []string{"true"}}, + {Name: awssdk.String(tagKey + SubnetRoleLabel), Values: []string{"private"}}, }, }) if err != nil {