mirror of
https://github.com/golang/go
synced 2024-11-12 09:50:21 -07:00
net: document OpError
Fixes #4797 R=adg, rsc CC=golang-dev https://golang.org/cl/7300099
This commit is contained in:
parent
8e7d156237
commit
158a0353f7
@ -276,10 +276,22 @@ type Listener interface {
|
||||
|
||||
var errMissingAddress = errors.New("missing address")
|
||||
|
||||
// OpError is the error type usually returned by functions in the net
|
||||
// package. It describes the operation, network type, and address of
|
||||
// an error.
|
||||
type OpError struct {
|
||||
// Op is the operation which caused the error, such as
|
||||
// "read" or "write".
|
||||
Op string
|
||||
|
||||
// Net is the network type on which this error occurred,
|
||||
// such as "tcp" or "udp6".
|
||||
Net string
|
||||
|
||||
// Addr is the network address on which this error occurred.
|
||||
Addr Addr
|
||||
|
||||
// Err is the error that occurred during the operation.
|
||||
Err error
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user