From 2fd44f2c5739b4afd8aa28cad1c6ee8708bb4b95 Mon Sep 17 00:00:00 2001 From: Anna Levenberg Date: Wed, 15 Nov 2023 11:00:22 -0500 Subject: [PATCH] gofmt --- pkg/image/remote/remote_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/image/remote/remote_test.go b/pkg/image/remote/remote_test.go index 9981516a9d..e93b1f5a4c 100644 --- a/pkg/image/remote/remote_test.go +++ b/pkg/image/remote/remote_test.go @@ -28,7 +28,7 @@ import ( ) // mockImage mocks the v1.Image interface -type mockImage struct{ +type mockImage struct { } func (m *mockImage) ConfigFile() (*v1.ConfigFile, error) { @@ -150,8 +150,8 @@ func Test_RetryRetrieveRemoteImageSucceeds(t *testing.T) { } attempts := 0 remoteImageFunc = func(ref name.Reference, options ...remote.Option) (v1.Image, error) { - if attempts < 2{ - attempts ++ + if attempts < 2 { + attempts++ return nil, errors.New("no image found") } return &mockImage{}, nil @@ -173,8 +173,8 @@ func Test_NoRetryRetrieveRemoteImageFails(t *testing.T) { } attempts := 0 remoteImageFunc = func(ref name.Reference, options ...remote.Option) (v1.Image, error) { - if attempts < 1 { - attempts ++ + if attempts < 1 { + attempts++ return nil, errors.New("no image found") } return &mockImage{}, nil @@ -186,4 +186,4 @@ func Test_NoRetryRetrieveRemoteImageFails(t *testing.T) { if _, err := RetrieveRemoteImage(image, opts, ""); err == nil { t.Fatal("Expected call to fail because there is no retry") } -} \ No newline at end of file +}