diff options
| author | Shulhan <ms@kilabit.info> | 2021-08-06 18:50:20 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-08-06 18:50:20 +0700 |
| commit | 5024d1c078f9eea37a7cbcb744b9b5ab7acfb127 (patch) | |
| tree | 5c68eb46037420d32dfd9ae90f71b4d5bb80d6f6 | |
| parent | 46847b5ad2470ff92e5d7e3c3a0cf090625ecba9 (diff) | |
| download | pakakeh.go-5024d1c078f9eea37a7cbcb744b9b5ab7acfb127.tar.xz | |
Revert "lib/errors: return the internal error only if its not nil on Unwrap"
This reverts commit 8379a3ac6385e811410ec512b414655926163c8d.
| -rw-r--r-- | lib/errors/errors.go | 8 |
1 files changed, 2 insertions, 6 deletions
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 } |
