mirror of https://github.com/docker/cli.git
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 <kolyshkin@gmail.com>
This commit is contained in:
parent
9412739186
commit
906c2d161a
|
@ -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,
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue