Add a couple more test cases
joeybloggs
8 years ago
1992 | 1992 | param string |
1993 | 1993 | expected bool |
1994 | 1994 | }{ |
1995 | {"", false}, | |
1995 | 1996 | {":80", false}, |
1996 | 1997 | {"127.0.0.1:80", true}, |
1997 | 1998 | {"[::1]:80", true}, |
2023 | 2024 | param string |
2024 | 2025 | expected bool |
2025 | 2026 | }{ |
2027 | {"", false}, | |
2026 | 2028 | {":80", false}, |
2027 | 2029 | {"127.0.0.1:80", false}, |
2028 | 2030 | {"[::1]:80", true}, |
2054 | 2056 | param string |
2055 | 2057 | expected bool |
2056 | 2058 | }{ |
2059 | {"", false}, | |
2057 | 2060 | {":80", false}, |
2058 | 2061 | {"127.0.0.1:80", true}, |
2059 | 2062 | {"[::1]:80", false}, // https://github.com/golang/go/issues/14037 |
2086 | 2089 | param string |
2087 | 2090 | expected bool |
2088 | 2091 | }{ |
2092 | {"", false}, | |
2089 | 2093 | {":80", false}, |
2090 | 2094 | {"127.0.0.1:80", true}, |
2091 | 2095 | {"[::1]:80", true}, |
2117 | 2121 | param string |
2118 | 2122 | expected bool |
2119 | 2123 | }{ |
2124 | {"", false}, | |
2120 | 2125 | {":80", false}, |
2121 | 2126 | {"127.0.0.1:80", false}, |
2122 | 2127 | {"[::1]:80", true}, |
2148 | 2153 | param string |
2149 | 2154 | expected bool |
2150 | 2155 | }{ |
2156 | {"", false}, | |
2151 | 2157 | {":80", false}, |
2152 | 2158 | {"127.0.0.1:80", true}, |
2153 | 2159 | {"[::1]:80", false}, // https://github.com/golang/go/issues/14037 |