diff --git a/file/error.go b/file/error.go index 324ef89..c5bd7c4 100644 --- a/file/error.go +++ b/file/error.go @@ -1,5 +1,6 @@ package file +import "os" import "fmt" type ErrorKind int @@ -70,3 +71,8 @@ func (err Error) Error () (formattedMessage string) { return } + +// Print formats the error and prints it to stderr. +func (err Error) Print () { + os.Stderr.Write([]byte(err.Error())) +}