From 01507b9ad168b98a1d528e6039f98a13d633034e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 20 Dec 2011 14:32:33 -0800 Subject: [PATCH] net: fix Windows build R=golang-dev, r CC=golang-dev https://golang.org/cl/5505048 --- src/pkg/net/fd.go | 8 -------- src/pkg/net/net.go | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pkg/net/fd.go b/src/pkg/net/fd.go index 5318c51c9a2..bcd04a0ad87 100644 --- a/src/pkg/net/fd.go +++ b/src/pkg/net/fd.go @@ -377,14 +377,6 @@ func (fd *netFD) CloseWrite() error { return fd.shutdown(syscall.SHUT_WR) } -type timeoutError struct{} - -func (e *timeoutError) Error() string { return "i/o timeout" } -func (e *timeoutError) Timeout() bool { return true } -func (e *timeoutError) Temporary() bool { return true } - -var errTimeout error = &timeoutError{} - func (fd *netFD) Read(p []byte) (n int, err error) { if fd == nil { return 0, os.EINVAL diff --git a/src/pkg/net/net.go b/src/pkg/net/net.go index 48f0ae791c8..b236dfdb1dd 100644 --- a/src/pkg/net/net.go +++ b/src/pkg/net/net.go @@ -157,6 +157,14 @@ func (e *OpError) Timeout() bool { return ok && t.Timeout() } +type timeoutError struct{} + +func (e *timeoutError) Error() string { return "i/o timeout" } +func (e *timeoutError) Timeout() bool { return true } +func (e *timeoutError) Temporary() bool { return true } + +var errTimeout error = &timeoutError{} + type AddrError struct { Err string Addr string