- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for removeEmptyPort (0.08 sec)
-
internal/rest/client.go
// return true if the string includes a port. func hasPort(s string) bool { return strings.LastIndex(s, ":") > strings.LastIndex(s, "]") } // removeEmptyPort strips the empty port in ":port" to "" // as mandated by RFC 3986 Section 6.2.3. func removeEmptyPort(host string) string { if hasPort(host) { return strings.TrimSuffix(host, ":") } return host }
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 12:55:01 UTC 2024 - 14.7K bytes - Viewed (0)