mirror of
https://github.com/golang/go
synced 2024-11-12 07:00:21 -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:
parent
0f1056667f
commit
d3285f2a79
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user