Commit 549ca930 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

net: move DNSConfigError to a portable file

The type being unavailable on Windows was the only API
signature difference in the net package.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5608043
parent 64a73b03
......@@ -17,19 +17,6 @@ type dnsConfig struct {
rotate bool // round robin among servers
}
var dnsconfigError error
type DNSConfigError struct {
Err error
}
func (e *DNSConfigError) Error() string {
return "error reading DNS config: " + e.Err.Error()
}
func (e *DNSConfigError) Timeout() bool { return false }
func (e *DNSConfigError) Temporary() bool { return false }
// See resolv.conf(5) on a Linux machine.
// TODO(rsc): Supposed to call uname() and chop the beginning
// of the host name to get the default search domain.
......
......@@ -201,3 +201,15 @@ type UnknownNetworkError string
func (e UnknownNetworkError) Error() string { return "unknown network " + string(e) }
func (e UnknownNetworkError) Temporary() bool { return false }
func (e UnknownNetworkError) Timeout() bool { return false }
// DNSConfigError represents an error reading the machine's DNS configuration.
type DNSConfigError struct {
Err error
}
func (e *DNSConfigError) Error() string {
return "error reading DNS config: " + e.Err.Error()
}
func (e *DNSConfigError) Timeout() bool { return false }
func (e *DNSConfigError) Temporary() bool { return false }
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