aboutsummaryrefslogtreecommitdiff
path: root/src/errors/wrap_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors/wrap_test.go')
-rw-r--r--src/errors/wrap_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/errors/wrap_test.go b/src/errors/wrap_test.go
index a22fee2f04..eb8314b04b 100644
--- a/src/errors/wrap_test.go
+++ b/src/errors/wrap_test.go
@@ -66,7 +66,7 @@ var poserPathErr = &fs.PathError{Op: "poser"}
func (p *poser) Error() string { return p.msg }
func (p *poser) Is(err error) bool { return p.f(err) }
-func (p *poser) As(err interface{}) bool {
+func (p *poser) As(err any) bool {
switch x := err.(type) {
case **poser:
*x = p
@@ -90,9 +90,9 @@ func TestAs(t *testing.T) {
testCases := []struct {
err error
- target interface{}
+ target any
match bool
- want interface{} // value of target on match
+ want any // value of target on match
}{{
nil,
&errP,
@@ -171,7 +171,7 @@ func TestAs(t *testing.T) {
func TestAsValidation(t *testing.T) {
var s string
- testCases := []interface{}{
+ testCases := []any{
nil,
(*int)(nil),
"error",