diff --git a/pkg/skaffold/docker/image.go b/pkg/skaffold/docker/image.go index e47a4230922..ba4a2e89c70 100644 --- a/pkg/skaffold/docker/image.go +++ b/pkg/skaffold/docker/image.go @@ -29,7 +29,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/mount" "github.com/docker/docker/client" - "github.com/docker/docker/errdefs" + "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" @@ -42,7 +42,7 @@ import ( ) const ( - retrials = 5 + retries = 5 sleepTime = 1 * time.Second ) @@ -391,7 +391,7 @@ func (l *localDaemon) ImageInspectWithRaw(ctx context.Context, image string) (ty } func (l *localDaemon) ImageRemove(ctx context.Context, image string, opts types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error) { - for i := 0; i < retrials; i++ { + for i := 0; i < retries; i++ { resp, err := l.apiClient.ImageRemove(ctx, image, opts) if err == nil { return resp, nil @@ -401,7 +401,7 @@ func (l *localDaemon) ImageRemove(ctx context.Context, image string, opts types. } time.Sleep(sleepTime) } - return nil, fmt.Errorf("could not remove image after %d retries", retrials) + return nil, fmt.Errorf("could not remove image after %d retries", retries) } // GetBuildArgs gives the build args flags for docker build.