From db84a450d7648fde9324f974f2c2b40dd4044704 Mon Sep 17 00:00:00 2001 From: Mikio Hara Date: Sat, 10 Aug 2013 09:46:22 +0900 Subject: [PATCH] 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 --- src/pkg/net/ipsock.go | 6 ------ src/pkg/net/net.go | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/pkg/net/ipsock.go b/src/pkg/net/ipsock.go index bde4394ff0..33b584db57 100644 --- a/src/pkg/net/ipsock.go +++ b/src/pkg/net/ipsock.go @@ -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 diff --git a/src/pkg/net/net.go b/src/pkg/net/net.go index c077b4cc48..fbf207c5f8 100644 --- a/src/pkg/net/net.go +++ b/src/pkg/net/net.go @@ -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 -- 2.48.1