summaryrefslogtreecommitdiff
path: root/src/net/error_test.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
committerCherry Zhang <cherryyz@google.com>2020-10-28 09:12:20 -0400
commita16e30d162c1c7408db7821e7b9513cefa09c6ca (patch)
treeaf752ba9ba44c547df39bb0af9bff79f610ba9d5 /src/net/error_test.go
parent91e4d2d57bc341dd82c98247117114c851380aef (diff)
parentcf6cfba4d5358404dd890f6025e573a4b2156543 (diff)
downloadgo-git-dev.link.tar.gz
[dev.link] all: merge branch 'master' into dev.linkdev.link
Clean merge. Change-Id: Ia7b2808bc649790198d34c226a61d9e569084dc5
Diffstat (limited to 'src/net/error_test.go')
-rw-r--r--src/net/error_test.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/error_test.go b/src/net/error_test.go
index 62dfb9c15d..7823fdf9d8 100644
--- a/src/net/error_test.go
+++ b/src/net/error_test.go
@@ -12,6 +12,7 @@ import (
"fmt"
"internal/poll"
"io"
+ "io/fs"
"io/ioutil"
"net/internal/socktest"
"os"
@@ -97,7 +98,7 @@ second:
case *os.SyscallError:
nestedErr = err.Err
goto third
- case *os.PathError: // for Plan 9
+ case *fs.PathError: // for Plan 9
nestedErr = err.Err
goto third
}
@@ -531,7 +532,7 @@ second:
case *os.SyscallError:
nestedErr = err.Err
goto third
- case *os.PathError: // for Plan 9
+ case *fs.PathError: // for Plan 9
nestedErr = err.Err
goto third
}
@@ -546,7 +547,7 @@ third:
return nil
}
switch nestedErr {
- case os.ErrClosed: // for Plan 9
+ case fs.ErrClosed: // for Plan 9
return nil
}
return fmt.Errorf("unexpected type on 3rd nested level: %T", nestedErr)
@@ -627,7 +628,7 @@ second:
case *os.SyscallError:
nestedErr = err.Err
goto third
- case *os.PathError: // for Plan 9
+ case *fs.PathError: // for Plan 9
nestedErr = err.Err
goto third
}
@@ -706,7 +707,7 @@ second:
case *os.LinkError:
nestedErr = err.Err
goto third
- case *os.PathError:
+ case *fs.PathError:
nestedErr = err.Err
goto third
}
@@ -799,7 +800,7 @@ func parseLookupPortError(nestedErr error) error {
switch nestedErr.(type) {
case *AddrError, *DNSError:
return nil
- case *os.PathError: // for Plan 9
+ case *fs.PathError: // for Plan 9
return nil
}
return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)