We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e7667f commit 9d73e6cCopy full SHA for 9d73e6c
src/os/errors.go
@@ -70,6 +70,16 @@ func (e *SyscallError) Error() string { return e.Syscall + ": " + e.Err.Error()
70
71
func (e *SyscallError) Unwrap() error { return e.Err }
72
73
+type timeout interface {
74
+ Timeout() bool
75
+}
76
+
77
+// Timeout reports whether this error represents a timeout.
78
+func (e *SyscallError) Timeout() bool {
79
+ t, ok := e.Err.(timeout)
80
+ return ok && t.Timeout()
81
82
83
func IsExist(err error) bool {
84
return underlyingErrorIs(err, ErrExist)
85
}
0 commit comments