summaryrefslogtreecommitdiff
path: root/conv
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2023-02-04 20:48:57 -0500
committerDave Henderson <dhenderson@gmail.com>2023-02-04 21:16:18 -0500
commit6af93cd2bd89d38ade8d9384fe3798aed1a38a65 (patch)
tree5a505a798217963cd8aa89e54767cd1a8d38feea /conv
parent08d70cf321ffede08205594ae4e7633f944647da (diff)
Remove uses of pkg/errors
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'conv')
-rw-r--r--conv/conv.go5
1 files changed, 2 insertions, 3 deletions
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