fix exportloopref linter

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-04-29 20:00:01 +02:00
parent 6fc8034870
commit f96d31e465
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D
2 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,6 @@ issues:
- nilnil
- nakedret
- musttag
- exportloopref
- gomoddirectives
text: ".*"
- linters:

View File

@ -136,7 +136,7 @@ func TestGeneratesNewPrivateKeyIfMarkedInvalidRequest(t *testing.T) {
t.Fatalf("failed to update certificate: %v", err)
}
var secondReq *cmapi.CertificateRequest
var secondReq cmapi.CertificateRequest
if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, time.Second*10, true, func(ctx context.Context) (bool, error) {
reqs, err := cmCl.CertmanagerV1().CertificateRequests(namespace).List(ctx, metav1.ListOptions{})
if err != nil {
@ -151,7 +151,7 @@ func TestGeneratesNewPrivateKeyIfMarkedInvalidRequest(t *testing.T) {
continue
}
secondReq = &req // #nosec G601 -- False positive. See https://github.com/golang/go/discussions/56010
secondReq = req
return true, nil
}
@ -273,7 +273,7 @@ func TestGeneratesNewPrivateKeyPerRequest(t *testing.T) {
t.Fatalf("failed to update certificate: %v", err)
}
var secondReq *cmapi.CertificateRequest
var secondReq cmapi.CertificateRequest
if err := wait.PollUntilContextTimeout(ctx, time.Millisecond*500, time.Second*10, true, func(ctx context.Context) (bool, error) {
reqs, err := cmCl.CertmanagerV1().CertificateRequests(namespace).List(ctx, metav1.ListOptions{})
if err != nil {
@ -288,7 +288,7 @@ func TestGeneratesNewPrivateKeyPerRequest(t *testing.T) {
continue
}
secondReq = &req // #nosec G601 -- False positive. See https://github.com/golang/go/discussions/56010
secondReq = req
return true, nil
}