@@ -27,20 +27,27 @@ func _() {
2727
2828 _ = fmt .Sprintf ("http://example.com:9211" )
2929
30- _ = fmt .Sprintf ("gopher://%s:%d" , "myHost" , 70 ) // want "should be constructed with net.JoinHostPort"
30+ _ = fmt .Sprintf ("gopher://%s:%d" , "myHost" , 70 )
3131
32- _ = fmt .Sprintf ("telnet+ssl://%s:%d" , "myHost" , 23 ) // want "should be constructed with net.JoinHostPort"
32+ _ = fmt .Sprintf ("telnet+ssl://%s:%d" , "myHost" , 23 )
3333
34- _ = fmt .Sprintf ("weird3.6://%s:%d" , "myHost" , 23 ) // want "should be constructed with net.JoinHostPort"
34+ _ = fmt .Sprintf ("weird3.6://%s:%d" , "myHost" , 23 )
3535
3636 _ = fmt .Sprintf ("https://user@%s:%d" , "myHost" , 8443 ) // want "should be constructed with net.JoinHostPort"
3737
3838 _ = fmt .Sprintf ("postgres://%s:%s@%s:5050/%s" , "foo" , "bar" , "baz" , "qux" ) // want "should be constructed with net.JoinHostPort"
3939
40- _ = fmt .Sprintf ("https://%s:%d" , "myHost" , 8443 ) // want "should be constructed with net.JoinHostPort"
40+ _ = fmt .Sprintf ("https://%s:%d" , "myHost" , 8443 )
4141
42- _ = fmt .Sprintf ("https://%s:9211" , "myHost" ) // want "should be constructed with net.JoinHostPort"
42+ _ = fmt .Sprintf ("https://%s:9211" , "myHost" )
43+
44+ _ = fmt .Sprintf ("postgres://%s:%s@%s:5050/%s" , "myHost" ) // want "should be constructed with net.JoinHostPort"
45+
46+ _ = fmt .Sprintf ("https://%s:9211" , "my:Host" ) // want "should be constructed with net.JoinHostPort"
4347
4448 ip := "fd00::1"
4549 _ = fmt .Sprintf ("http://%s:1936/healthz" , ip ) // want "should be constructed with net.JoinHostPort"
46- }
50+
51+ const host = "myHost"
52+ _ = fmt .Sprintf ("https://%s:9211" , host ) // want "should be constructed with net.JoinHostPort"
53+ }
0 commit comments