mirror of
https://github.com/moby/moby.git
synced 2025-04-18 20:44:11 +03:00
opts: host:port should be constructed with net.JoinHostPort (nosprintfhostport)
opts/hosts_test.go:110:30: host:port in url should be constructed with net.JoinHostPort and not directly with fmt.Sprintf (nosprintfhostport) "tcp://:5555": fmt.Sprintf("tcp://%s:5555", DefaultHTTPHost), ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
0bf8c8b99e
commit
e9c90834fa
@ -107,7 +107,7 @@ func TestParseDockerDaemonHost(t *testing.T) {
|
||||
"npipe://": "npipe://" + DefaultNamedPipe,
|
||||
"npipe:////./pipe/foo": "npipe:////./pipe/foo",
|
||||
"tcp://": DefaultTCPHost,
|
||||
"tcp://:5555": fmt.Sprintf("tcp://%s:5555", DefaultHTTPHost),
|
||||
"tcp://:5555": fmt.Sprintf("tcp://%s:5555", DefaultHTTPHost), //nolint:nosprintfhostport // sprintf is more readable for this case.
|
||||
"tcp://[::1]": fmt.Sprintf("tcp://[::1]:%d", DefaultHTTPPort),
|
||||
"tcp://[::1]:": fmt.Sprintf("tcp://[::1]:%d", DefaultHTTPPort),
|
||||
"tcp://[::1]:5555": "tcp://[::1]:5555",
|
||||
|
Loading…
x
Reference in New Issue
Block a user