You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When SplitHostPost is given an invalid input (for example, and IPv6 address without a port), it returns an invalid/strange value for host alongside the error. This differs from many other funcs in the standard library (where usually zero values are returned unless documented otherwise), and invites mistakes if the user doesn't check the error.
For example in host, port, err := net.SplitHostPort("2001:db8::ff00:42:8329") host is "2001:db8::ff00:42".
The text was updated successfully, but these errors were encountered:
When
SplitHostPost
is given an invalid input (for example, and IPv6 address without a port), it returns an invalid/strange value for host alongside the error. This differs from many other funcs in the standard library (where usually zero values are returned unless documented otherwise), and invites mistakes if the user doesn't check the error.For example in
host, port, err := net.SplitHostPort("2001:db8::ff00:42:8329")
host is"2001:db8::ff00:42"
.The text was updated successfully, but these errors were encountered: