]> Cypherpunks repositories - gostls13.git/commitdiff
net: update ParseIP doc to say IPv4-mapped-IPv6 is supported
authorBrad Fitzpatrick <bradfitz@golang.org>
Thu, 2 Apr 2020 16:04:24 +0000 (09:04 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 2 Apr 2020 22:10:27 +0000 (22:10 +0000)
Change-Id: I49a79c07081cd8f12a3ffef21fd02a9a622a7eb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/226979
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/ip.go

index 9d1223e705eb3d88cadcddde48957ecafcec57fd..c00fe8ed3cc64f704572996e946ee37f332b5674 100644 (file)
@@ -671,8 +671,8 @@ func parseIPv6(s string) (ip IP) {
 }
 
 // ParseIP parses s as an IP address, returning the result.
-// The string s can be in dotted decimal ("192.0.2.1")
-// or IPv6 ("2001:db8::68") form.
+// The string s can be in IPv4 dotted decimal ("192.0.2.1"), IPv6
+// ("2001:db8::68"), or IPv4-mapped IPv6 ("::ffff:192.0.2.1") form.
 // If s is not a valid textual representation of an IP address,
 // ParseIP returns nil.
 func ParseIP(s string) IP {