Skip to content

Commit

Permalink
Make *Error implement Unwrap (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
aureliar8 committed Jun 15, 2022
1 parent 060805c commit 5a86313
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xattr.go
Expand Up @@ -29,6 +29,8 @@ type Error struct {
Err error
}

func (e *Error) Unwrap() error { return e.Err }

func (e *Error) Error() (errstr string) {
if e.Op != "" {
errstr += e.Op
Expand Down

0 comments on commit 5a86313

Please sign in to comment.