From d604f40c44852bbc4a670fef30d85099451ab0f1 Mon Sep 17 00:00:00 2001 From: Jan Kantert Date: Fri, 12 Jul 2024 18:59:21 +0200 Subject: [PATCH] remove LOOP labels --- pkg/bundle/source.go | 3 +-- test/env/data.go | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/bundle/source.go b/pkg/bundle/source.go index b5141826..c0fa3c5a 100644 --- a/pkg/bundle/source.go +++ b/pkg/bundle/source.go @@ -371,11 +371,10 @@ func deduplicateAndSortBundles(bundles []string) ([]string, error) { for _, cert := range bundles { certBytes := []byte(cert) - LOOP: for { block, certBytes = pem.Decode(certBytes) if block == nil { - break LOOP + break } if block.Type != "CERTIFICATE" { diff --git a/test/env/data.go b/test/env/data.go index bc43a7f4..46f669cd 100644 --- a/test/env/data.go +++ b/test/env/data.go @@ -217,11 +217,10 @@ func CheckBundleSyncedContains(ctx context.Context, cl client.Client, name strin var block *pem.Block certBytes := []byte(containedData) - LOOP: for { block, certBytes = pem.Decode(certBytes) if block == nil { - break LOOP + break } if block.Type != "CERTIFICATE" { @@ -236,11 +235,11 @@ func CheckBundleSyncedContains(ctx context.Context, cl client.Client, name strin certBytes = []byte(got) // check that there are a nonzero number of valid certs remaining found := false - LOOP2: + for { block, certBytes = pem.Decode(certBytes) if block == nil { - break LOOP2 + break } if block.Type != "CERTIFICATE" {