Documentation ¶
Overview ¶
punix has functions to examine unix.Errno errors
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errno ¶
Errno scans an error chain for a unix.Errno type. Errno returns unix.Errno 0x0 if none exists. Note: unix.Errno.Error has value receiver. Errno checks:
Errno(nil) == 0 → true. if errno != 0 {… int(errno) provides the numeric value. if errno == unix.ENOENT… fmt.Printf("%v", errno) → state not recoverable fmt.Printf("0x%x", int(errno)) → 0x68
func ErrnoError ¶
ErrnoError gets the errno interpretation if the error chain does contain a unix.Errno type. if includeError is true, the error chain’s error message is prepended. if includeError is true and err is nil "OK" is returned if includeError is false or missing and no errno exists, the empty string is returned
func IsConnectionRefused ¶
IsConnectionRefused searches the error chsin of err for unix.ECONNREFUSED net.Dialer errors for closed socket
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.