We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69d524d commit 049c0ecCopy full SHA for 049c0ec
src/util/hostname.go
@@ -35,7 +35,7 @@ func ExtractListenPort(listen string) string {
35
} else {
36
lenListen := len(listen)
37
if (lenListen < 5 && IsDigits(listen)) ||
38
- (lenListen == 5 && strings.Compare(listen, "65535") == -1) {
+ (lenListen == 5 && listen < "65536") {
39
return listen
40
}
41
src/util/hostname_test.go
@@ -64,6 +64,10 @@ func TestExtractListenPort(t *testing.T) {
64
t.Error(1)
65
66
67
+ if ExtractListenPort("65535") != "65535" {
68
+ t.Error(1)
69
+ }
70
+
71
if ExtractListenPort("65536") != "" {
72
73
0 commit comments