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

net: remove types InvalidConnError and UnknownSocketError

Both are unused and undocumented.

InvalidConnError is also non-idiomatic: a FooError type can
typically describe something, else it would be an ErrFoo
variable.

R=golang-dev, alex.brainman
CC=golang-dev
https://golang.org/cl/5609045
This commit is contained in:
Brad Fitzpatrick 2012-01-31 15:04:42 -08:00
parent 0f1056667f
commit d3285f2a79
3 changed files with 0 additions and 21 deletions

View File

@ -43,12 +43,6 @@ type netFD struct {
ncr, ncw int
}
type InvalidConnError struct{}
func (e *InvalidConnError) Error() string { return "invalid Conn" }
func (e *InvalidConnError) Temporary() bool { return false }
func (e *InvalidConnError) Timeout() bool { return false }
// A pollServer helps FDs determine when to retry a non-blocking
// read or write after they get EAGAIN. When an FD needs to wait,
// send the fd on s.cr (for a read) or s.cw (for a write) to pass the

View File

@ -14,12 +14,6 @@ import (
"unsafe"
)
type InvalidConnError struct{}
func (e *InvalidConnError) Error() string { return "invalid Conn" }
func (e *InvalidConnError) Temporary() bool { return false }
func (e *InvalidConnError) Timeout() bool { return false }
var initErr error
func init() {

View File

@ -10,7 +10,6 @@ package net
import (
"io"
"reflect"
"syscall"
)
@ -70,14 +69,6 @@ func socket(net string, f, t, p int, la, ra syscall.Sockaddr, toAddr func(syscal
return fd, nil
}
type UnknownSocketError struct {
sa syscall.Sockaddr
}
func (e *UnknownSocketError) Error() string {
return "unknown socket address type " + reflect.TypeOf(e.sa).String()
}
type writerOnly struct {
io.Writer
}