Source file
src/net/error_windows_test.go
1
2
3
4
5 package net
6
7 import (
8 "errors"
9 "syscall"
10 )
11
12 var (
13 errTimedout = syscall.ETIMEDOUT
14 errOpNotSupported = syscall.EOPNOTSUPP
15
16 abortedConnRequestErrors = []error{syscall.ERROR_NETNAME_DELETED, syscall.WSAECONNRESET}
17 )
18
19 func isPlatformError(err error) bool {
20 _, ok := err.(syscall.Errno)
21 return ok
22 }
23
24 func isENOBUFS(err error) bool {
25
26
27
28 return errors.Is(err, syscall.ENOBUFS)
29 }
30
View as plain text