36b3af2e3d
PR Check / Code Quality: Format (push) Failing after 1s
PR Check / Code Quality: Lint (darwin) (push) Failing after 0s
PR Check / Code Quality: Lint (freebsd) (push) Failing after 1s
PR Check / Code Quality: Lint (windows) (push) Failing after 1s
PR Check / Code Quality: Lint (linux) (push) Failing after 1s
PR Check / Security: Vulnerability Scan (push) Failing after 0s
Update Documentation / update-docs (push) Failing after 2s
PR Check / Code Quality: Vendor (push) Failing after 1s
PR Check / Code Quality: Coverage (push) Failing after 0s
PR Check / Tests: Unit (macos-latest) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04-arm) (push) Has been cancelled
PR Check / Tests: Unit (windows-latest) (push) Has been cancelled
19 lines
632 B
Go
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)
|
|
}
|