Skip to content

Commit

Permalink
Created BaseError.Unwrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnsonaz committed Sep 14, 2024
1 parent 547992e commit d93baee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions base_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func WrapError(err error) BaseError {
}
}

func (be BaseError) Unwrap() error {
return be.error
}

func (be BaseError) Wrap(text string) BaseError {
return BaseError{
error: fmt.Errorf("%w: %v", be, text),
Expand Down

0 comments on commit d93baee

Please sign in to comment.