Created
February 11, 2018 14:54
-
-
Save tomtsang/d2ecfeb1502bc1eef0cfb09eedeeaecc to your computer and use it in GitHub Desktop.
path-error.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PathError records an error and the operation and file path that caused it. | |
type PathError struct { | |
Op string // "open", "unlink", etc. | |
Path string // The associated file. | |
Err error // Returned by the system call. | |
} | |
func (e *PathError) String() string { | |
return e.Op + " " + e.Path + ": "+ e.Err.Error() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment