1
0
mirror of https://github.com/golang/go synced 2024-11-22 03:44:39 -07:00

net: move InvalidAddrError type into net.go

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
This commit is contained in:
Mikio Hara 2013-08-10 09:46:22 +09:00
parent e486cefec2
commit db84a450d7
2 changed files with 6 additions and 6 deletions

View 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

View 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