Commit d3285f2a authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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
parent 0f105666
......@@ -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
......
......@@ -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() {
......
......@@ -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
}
......
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