Skip to content

Commit af9efbf

Browse files
committed
refactor: remove custom error types in stdlib
1 parent d62f508 commit af9efbf

File tree

2 files changed

+2
-52
lines changed

2 files changed

+2
-52
lines changed

pkg/stdlib/errors.go

-50
This file was deleted.

pkg/stdlib/functions.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ var Uniq = expr.Function(
4545
return UniqSlice(elements), nil
4646

4747
default:
48-
return nil, NewInvalidArgumentTypeError("uniq", fmt.Sprintf("invalid input, must be an array of [string] or [interface], got %T", args[0]))
48+
return nil, fmt.Errorf("invalid input, must be an array of [string] or [interface], got %T", args[0])
4949
}
5050
},
51-
new(func([]string) []string), // []string -> []string
5251
new(func([]any) []string), // []any -> []string (when using map() that always return []any)
52+
new(func([]string) []string), // []string -> []string
5353
)
5454

5555
// Override built-in duration() function to provide support for additional periods

0 commit comments

Comments
 (0)