From 612d83d6dfabded3891c166d3d2537f12895af4f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 14:00:31 +0100 Subject: [PATCH] cli: remove unnecessary newlines (whitespace) ``` cli/config/config_test.go:465: unnecessary trailing newline (whitespace) } cli/compose/interpolation/interpolation.go:56: unnecessary leading newline (whitespace) switch value := value.(type) { cli/compose/interpolation/interpolation.go:94: unnecessary trailing newline (whitespace) } cli/command/image/build/context.go:348: unnecessary trailing newline (whitespace) } internal/licenseutils/client_test.go:98: unnecessary leading newline (whitespace) func (c *fakeLicensingClient) LoadLocalLicense(ctx context.Context, dclnt licensing.WrappedDockerClient) (*model.Subscription, error) { cli/registry/client/fetcher.go:211: unnecessary leading newline (whitespace) for _, endpoint := range endpoints { ``` Signed-off-by: Sebastiaan van Stijn --- cli/command/image/build/context.go | 1 - cli/compose/interpolation/interpolation.go | 2 -- cli/compose/schema/schema_test.go | 1 - cli/config/config_test.go | 1 - cli/context/store/tlsstore_test.go | 1 - cli/registry/client/fetcher.go | 1 - 6 files changed, 7 deletions(-) diff --git a/cli/command/image/build/context.go b/cli/command/image/build/context.go index ada5fa3ecf..24a9d525b5 100644 --- a/cli/command/image/build/context.go +++ b/cli/command/image/build/context.go @@ -345,7 +345,6 @@ func getDockerfileRelPath(absContextDir, givenDockerfile string) (string, error) absDockerfile, err = filepath.EvalSymlinks(absDockerfile) if err != nil { return "", errors.Errorf("unable to evaluate symlinks in Dockerfile path: %v", err) - } } diff --git a/cli/compose/interpolation/interpolation.go b/cli/compose/interpolation/interpolation.go index d4f5c4a43f..fd34ca82ea 100644 --- a/cli/compose/interpolation/interpolation.go +++ b/cli/compose/interpolation/interpolation.go @@ -54,7 +54,6 @@ func Interpolate(config map[string]interface{}, opts Options) (map[string]interf func recursiveInterpolate(value interface{}, path Path, opts Options) (interface{}, error) { switch value := value.(type) { - case string: newValue, err := opts.Substitute(value, template.Mapping(opts.LookupValue)) if err != nil || newValue == value { @@ -91,7 +90,6 @@ func recursiveInterpolate(value interface{}, path Path, opts Options) (interface default: return value, nil - } } diff --git a/cli/compose/schema/schema_test.go b/cli/compose/schema/schema_test.go index 3d3c29a666..27aa70de7a 100644 --- a/cli/compose/schema/schema_test.go +++ b/cli/compose/schema/schema_test.go @@ -118,7 +118,6 @@ func TestValidateCredentialSpecs(t *testing.T) { } }) } - } func TestValidateSecretConfigNames(t *testing.T) { diff --git a/cli/config/config_test.go b/cli/config/config_test.go index 639829555c..f9dfa224c4 100644 --- a/cli/config/config_test.go +++ b/cli/config/config_test.go @@ -462,7 +462,6 @@ func TestJSONWithPsFormatNoFile(t *testing.T) { if config.PsFormat != `table {{.ID}}\t{{.Label "com.docker.label.cpu"}}` { t.Fatalf("Unknown ps format: %s\n", config.PsFormat) } - } func TestJSONSaveWithNoFile(t *testing.T) { diff --git a/cli/context/store/tlsstore_test.go b/cli/context/store/tlsstore_test.go index 6079de0f8e..e8d029606e 100644 --- a/cli/context/store/tlsstore_test.go +++ b/cli/context/store/tlsstore_test.go @@ -75,5 +75,4 @@ func TestTlsListAndBatchRemove(t *testing.T) { resEmpty, err := testee.listContextData("test-ctx") assert.NilError(t, err) assert.DeepEqual(t, resEmpty, map[string]EndpointFiles{}) - } diff --git a/cli/registry/client/fetcher.go b/cli/registry/client/fetcher.go index 2060f99126..678ea2649e 100644 --- a/cli/registry/client/fetcher.go +++ b/cli/registry/client/fetcher.go @@ -209,7 +209,6 @@ func (c *client) iterateEndpoints(ctx context.Context, namedRef reference.Named, confirmedTLSRegistries := make(map[string]bool) for _, endpoint := range endpoints { - if endpoint.Version == registry.APIVersion1 { logrus.Debugf("skipping v1 endpoint %s", endpoint.URL) continue