]> Cypherpunks repositories - gostls13.git/commit
net: make IP.{String,MarshalText} return helpful information on address error
authorMikio Hara <mikioh.mikioh@gmail.com>
Thu, 7 Apr 2016 08:19:29 +0000 (17:19 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Tue, 12 Apr 2016 00:41:17 +0000 (00:41 +0000)
commit1f54410a61e2242285e366a5580943f78fbff741
tree11cba610dac84e23af2db378ffaf94e5ce711501
parenta119f88f2c52e6eb969f51c5bf610d6f105348a3
net: make IP.{String,MarshalText} return helpful information on address error

This change makes String and MarshalText methods of IP return a
hexadecial form of IP with no punctuation as part of error
notification. It doesn't affect the existing behavior of ParseIP.

Also fixes bad shadowing in ipToSockaddr and makes use of reserved
IP address blocks for documnetation.

Fixes #15052.
Updates #15228.

Change-Id: I9e9ecce308952ed5683066c3d1bb6a7b36458c65
Reviewed-on: https://go-review.googlesource.com/21642
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/error_test.go
src/net/ip.go
src/net/ip_test.go
src/net/ipsock_posix.go