From 6af93cd2bd89d38ade8d9384fe3798aed1a38a65 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 4 Feb 2023 20:48:57 -0500 Subject: Remove uses of pkg/errors Signed-off-by: Dave Henderson --- conv/conv.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'conv') diff --git a/conv/conv.go b/conv/conv.go index c61319f3..39e69c59 100644 --- a/conv/conv.go +++ b/conv/conv.go @@ -9,7 +9,6 @@ import ( "strings" iconv "github.com/hairyhenderson/gomplate/v3/internal/conv" - "github.com/pkg/errors" ) // Bool converts a string to a boolean value, using strconv.ParseBool under the covers. @@ -90,7 +89,7 @@ func Join(in interface{}, sep string) (out string, err error) { if !ok { a, err = iconv.InterfaceSlice(in) if err != nil { - return "", errors.Wrap(err, "input to Join must be an array") + return "", fmt.Errorf("input to Join must be an array: %w", err) } ok = true } @@ -102,7 +101,7 @@ func Join(in interface{}, sep string) (out string, err error) { return strings.Join(b, sep), nil } - return "", errors.New("input to Join must be an array") + return "", fmt.Errorf("input to Join must be an array") } // Has determines whether or not a given object has a property with the given key -- cgit v1.2.3