os: define ErrNoDeadline

This commit is contained in:
Stepan Rakitin
2023-06-12 15:55:21 +02:00
committed by Ron Evans
parent 785eb93b62
commit 91ee4d0030
+4
View File
@@ -32,6 +32,10 @@ var (
// The following code is copied from the official implementation.
// src/internal/poll/fd.go
// ErrNoDeadline is returned when a request is made to set a deadline
// on a file type that does not use the poller.
var ErrNoDeadline = errors.New("file type does not support deadline")
// ErrDeadlineExceeded is returned for an expired deadline.
// This is exported by the os package as os.ErrDeadlineExceeded.
var ErrDeadlineExceeded error = &DeadlineExceededError{}