From 906c2d161a6ad4ccd3c6d16134385d619d1f7cc9 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 9 Oct 2018 23:37:35 -0700 Subject: [PATCH] gofmt with go-1.11 gofmt/goimports changed some heuristics in 1.11 and the code is now formatted slightly differently. No functional change, just whitespace. Signed-off-by: Kir Kolyshkin --- cli/command/stack/swarm/deploy_test.go | 4 ++-- opts/hosts_test.go | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cli/command/stack/swarm/deploy_test.go b/cli/command/stack/swarm/deploy_test.go index b1df60dcba..970d790bf2 100644 --- a/cli/command/stack/swarm/deploy_test.go +++ b/cli/command/stack/swarm/deploy_test.go @@ -71,14 +71,14 @@ func TestServiceUpdateResolveImageChanged(t *testing.T) { }{ // Image not changed { - image: "foobar:1.2.3", + image: "foobar:1.2.3", expectedQueryRegistry: false, expectedImage: "foobar:1.2.3@sha256:deadbeef", expectedForceUpdate: 123, }, // Image changed { - image: "foobar:1.2.4", + image: "foobar:1.2.4", expectedQueryRegistry: true, expectedImage: "foobar:1.2.4", expectedForceUpdate: 123, diff --git a/opts/hosts_test.go b/opts/hosts_test.go index 8aada6a953..a2b03f46d9 100644 --- a/opts/hosts_test.go +++ b/opts/hosts_test.go @@ -69,18 +69,18 @@ func TestParseDockerDaemonHost(t *testing.T) { "[::1]:5555/path": "tcp://[::1]:5555/path", "[0:0:0:0:0:0:0:1]:": "tcp://[0:0:0:0:0:0:0:1]:2375", "[0:0:0:0:0:0:0:1]:5555/path": "tcp://[0:0:0:0:0:0:0:1]:5555/path", - ":6666": fmt.Sprintf("tcp://%s:6666", DefaultHTTPHost), - ":6666/path": fmt.Sprintf("tcp://%s:6666/path", DefaultHTTPHost), - "tcp://": DefaultTCPHost, - "tcp://:7777": fmt.Sprintf("tcp://%s:7777", DefaultHTTPHost), - "tcp://:7777/path": fmt.Sprintf("tcp://%s:7777/path", DefaultHTTPHost), - "unix:///run/docker.sock": "unix:///run/docker.sock", - "unix://": "unix://" + DefaultUnixSocket, - "fd://": "fd://", - "fd://something": "fd://something", - "localhost:": "tcp://localhost:2375", - "localhost:5555": "tcp://localhost:5555", - "localhost:5555/path": "tcp://localhost:5555/path", + ":6666": fmt.Sprintf("tcp://%s:6666", DefaultHTTPHost), + ":6666/path": fmt.Sprintf("tcp://%s:6666/path", DefaultHTTPHost), + "tcp://": DefaultTCPHost, + "tcp://:7777": fmt.Sprintf("tcp://%s:7777", DefaultHTTPHost), + "tcp://:7777/path": fmt.Sprintf("tcp://%s:7777/path", DefaultHTTPHost), + "unix:///run/docker.sock": "unix:///run/docker.sock", + "unix://": "unix://" + DefaultUnixSocket, + "fd://": "fd://", + "fd://something": "fd://something", + "localhost:": "tcp://localhost:2375", + "localhost:5555": "tcp://localhost:5555", + "localhost:5555/path": "tcp://localhost:5555/path", } for invalidAddr, expectedError := range invalids { if addr, err := parseDockerDaemonHost(invalidAddr); err == nil || err.Error() != expectedError {