From 0c3d827a1e5a371fa426299e398ef78ad3554679 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 31 Mar 2020 09:52:58 -0700 Subject: [PATCH] Address feedback --- multierror.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/multierror.go b/multierror.go index c1b5159..6c51bd2 100644 --- a/multierror.go +++ b/multierror.go @@ -102,7 +102,7 @@ func (e chain) Unwrap() error { return nil } - return chain(e[1:]) + return e[1:] } // As implements errors.As by attempting to map to the current value. @@ -112,5 +112,5 @@ func (e chain) As(target interface{}) bool { // Is implements errors.Is by comparing the current value directly. func (e chain) Is(target error) bool { - return e[0] == target + return errors.Is(e[0], target) }