From 5024d1c078f9eea37a7cbcb744b9b5ab7acfb127 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Fri, 6 Aug 2021 18:50:20 +0700 Subject: Revert "lib/errors: return the internal error only if its not nil on Unwrap" This reverts commit 8379a3ac6385e811410ec512b414655926163c8d. --- lib/errors/errors.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/errors/errors.go') diff --git a/lib/errors/errors.go b/lib/errors/errors.go index 13e3b995..35b74d1c 100644 --- a/lib/errors/errors.go +++ b/lib/errors/errors.go @@ -58,12 +58,8 @@ func (e *E) Error() string { } // -// Unwrap return the internal error only if its not nil; otherwise it will -// return the e itself. +// Unwrap return the internal error. // func (e *E) Unwrap() error { - if e.err != nil { - return e.err - } - return e + return e.err } -- cgit v1.3-5-g9baa