From 54c9e89c3e8fb26e74a4cb01c54050c48d7ed65e Mon Sep 17 00:00:00 2001 From: jdl Date: Tue, 5 Dec 2023 11:16:35 +0100 Subject: [PATCH] Fixed unwrap method. --- lib/errs/error.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/errs/error.go b/lib/errs/error.go index 589e8ee..8857194 100644 --- a/lib/errs/error.go +++ b/lib/errs/error.go @@ -50,10 +50,7 @@ func (e *Error) WithErr(err error) *Error { } func (e *Error) Unwrap() error { - if e.err != nil { - return e.err - } - return e + return e.err } func (e *Error) WithMsg(msg string, args ...any) *Error {