]> Cypherpunks repositories - gostls13.git/commitdiff
net: move InvalidAddrError type into net.go
authorMikio Hara <mikioh.mikioh@gmail.com>
Sat, 10 Aug 2013 00:46:22 +0000 (09:46 +0900)
committerMikio Hara <mikioh.mikioh@gmail.com>
Sat, 10 Aug 2013 00:46:22 +0000 (09:46 +0900)
Probably we should remove this type before Go 1 contract has settled,
but too late. Instead, keep InvalidAddrError close to package generic
error types.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/12670044

src/pkg/net/ipsock.go
src/pkg/net/net.go

index bde4394ff0071737e5d083d9887d4c74c9d8a374..33b584db57962940a79046734e52503013ae2c5b 100644 (file)
@@ -85,12 +85,6 @@ func ipv6only(ip IP) IP {
        return nil
 }
 
-type InvalidAddrError string
-
-func (e InvalidAddrError) Error() string   { return string(e) }
-func (e InvalidAddrError) Timeout() bool   { return false }
-func (e InvalidAddrError) Temporary() bool { return false }
-
 // SplitHostPort splits a network address of the form "host:port",
 // "[host]:port" or "[ipv6-host%zone]:port" into host or
 // ipv6-host%zone and port.  A literal address or host name for IPv6
index c077b4cc48cd60accef5876dc202f8ff84d61424..fbf207c5f80e24208c71e5649eaf885e0c22b12c 100644 (file)
@@ -372,6 +372,12 @@ func (e UnknownNetworkError) Error() string   { return "unknown network " + stri
 func (e UnknownNetworkError) Temporary() bool { return false }
 func (e UnknownNetworkError) Timeout() bool   { return false }
 
+type InvalidAddrError string
+
+func (e InvalidAddrError) Error() string   { return string(e) }
+func (e InvalidAddrError) Timeout() bool   { return false }
+func (e InvalidAddrError) Temporary() bool { return false }
+
 // DNSConfigError represents an error reading the machine's DNS configuration.
 type DNSConfigError struct {
        Err error