diff --git a/error.go b/error.go index 749d6df..6e977f0 100644 --- a/error.go +++ b/error.go @@ -75,6 +75,11 @@ func (e *Error) Is(target error) bool { return tErr.tmpl == e.tmpl } + // target is the template itself, therefore they are considered equal to another + if tTmpl, ok := target.(*ErrTmpl); ok { + return tTmpl == e.tmpl + } + return false }