Commit db84a450 authored by Mikio Hara's avatar Mikio Hara

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
parent e486cefe
...@@ -85,12 +85,6 @@ func ipv6only(ip IP) IP { ...@@ -85,12 +85,6 @@ func ipv6only(ip IP) IP {
return nil 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", // SplitHostPort splits a network address of the form "host:port",
// "[host]:port" or "[ipv6-host%zone]:port" into host or // "[host]:port" or "[ipv6-host%zone]:port" into host or
// ipv6-host%zone and port. A literal address or host name for IPv6 // ipv6-host%zone and port. A literal address or host name for IPv6
......
...@@ -372,6 +372,12 @@ func (e UnknownNetworkError) Error() string { return "unknown network " + stri ...@@ -372,6 +372,12 @@ func (e UnknownNetworkError) Error() string { return "unknown network " + stri
func (e UnknownNetworkError) Temporary() bool { return false } func (e UnknownNetworkError) Temporary() bool { return false }
func (e UnknownNetworkError) Timeout() 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. // DNSConfigError represents an error reading the machine's DNS configuration.
type DNSConfigError struct { type DNSConfigError struct {
Err error Err error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment