abra/vendor/github.com/muesli/cancelreader/cancelreader_unix.go
decentral1se 47045ca8f1
All checks were successful
continuous-integration/drone/push Build is passing
feat: improved deploy progress reporting
See #478
2025-03-23 09:13:36 +00:00

19 lines
632 B
Go

//go:build solaris
// +build solaris
package cancelreader
import (
"io"
)
// NewReader returns a reader and a cancel function. If the input reader is a
// File, the cancel function can be used to interrupt a blocking read call.
// In this case, the cancel function returns true if the call was canceled
// successfully. If the input reader is not a File or the file descriptor
// is 1024 or larger, the cancel function does nothing and always returns false.
// The generic unix implementation is based on the posix select syscall.
func NewReader(reader io.Reader) (CancelReader, error) {
return newSelectCancelReader(reader)
}