Skip to content

Commit 3128edf

Browse files
tklausergopherbot
authored andcommitted
syscall: let EPLAN9 and EWINDOWS implement errors.ErrUnsupported
As suggested by Bryan. This should fix the failing TestIPConnSpecificMethods on plan9 after CL 476217 was submitted. For #41198 Change-Id: I18e87b3aa7c9f7d48a1bd9c2819340acd1d2ca4e Reviewed-on: https://go-review.googlesource.com/c/go/+/476578 Reviewed-by: Cherry Mui <[email protected]> Run-TryBot: Tobias Klauser <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Auto-Submit: Tobias Klauser <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 455168d commit 3128edf

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/syscall/syscall_plan9.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
package syscall
1313

1414
import (
15+
"errors"
1516
"internal/oserror"
1617
"runtime"
1718
"unsafe"
@@ -43,6 +44,8 @@ func (e ErrorString) Is(target error) bool {
4344
case oserror.ErrNotExist:
4445
return checkErrMessageContent(e, "does not exist", "not found",
4546
"has been removed", "no parent")
47+
case errors.ErrUnsupported:
48+
return checkErrMessageContent(e, "not supported")
4649
}
4750
return false
4851
}

src/syscall/syscall_windows.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ func (e Errno) Is(target error) bool {
156156
return e == ERROR_FILE_NOT_FOUND ||
157157
e == _ERROR_BAD_NETPATH ||
158158
e == ERROR_PATH_NOT_FOUND
159+
case errorspkg.ErrUnsupported:
160+
return e == EWINDOWS
159161
}
160162
return false
161163
}

0 commit comments

Comments
 (0)