Skip to content

Commit

Permalink
gofmt with go-1.11
Browse files Browse the repository at this point in the history
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 <kolyshkin@gmail.com>
  • Loading branch information
kolyshkin committed Oct 11, 2018
1 parent 9412739 commit 906c2d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cli/command/stack/swarm/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
24 changes: 12 additions & 12 deletions opts/hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 906c2d1

Please sign in to comment.