- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for mustSplitHostPort (0.1 sec)
-
cmd/net.go
// IPv6 addresses of localhost. localIP6 = mustGetLocalIP6() // List of all local loopback addresses. localLoopbacks = mustGetLocalLoopbacks() ) // mustSplitHostPort is a wrapper to net.SplitHostPort() where error is assumed to be a fatal. func mustSplitHostPort(hostPort string) (host, port string) { xh, err := xnet.ParseHost(hostPort) if err != nil { logger.FatalIf(err, "Unable to split host port %s", hostPort) }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jun 19 14:34:00 UTC 2024 - 9.6K bytes - Viewed (0) -
cmd/net_test.go
{"server:54321", "server", "54321"}, {":0", "", "0"}, {"server:https", "server", "443"}, {"server:http", "server", "80"}, } for _, testCase := range testCases { host, port := mustSplitHostPort(testCase.hostPort) if testCase.expectedHost != host { t.Fatalf("host: expected = %v, got = %v", testCase.expectedHost, host) } if testCase.expectedPort != port {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Apr 19 08:43:09 UTC 2024 - 9.3K bytes - Viewed (0)