Skip to content

Commit

Permalink
errors: fix comment referencing the Wrapper interface
Browse files Browse the repository at this point in the history
The Unwrap function performs a type assertion looking for the Wrapper
interface. The method of that interface is called Unwrap but the
interface itself is called Wrapper.
  • Loading branch information
jcbwlkr committed May 2, 2019
1 parent 762953b commit 32b1a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/errors/wrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (e noWrapper) FormatError(p Printer) (next error) {
}

// Unwrap returns the result of calling the Unwrap method on err, if err
// implements Unwrap. Otherwise, Unwrap returns nil.
// implements Wrapper. Otherwise, Unwrap returns nil.
func Unwrap(err error) error {
u, ok := err.(Wrapper)
if !ok {
Expand Down

0 comments on commit 32b1a0c

Please sign in to comment.