Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + type Error struct + Cause error + Code ErrorCode + func (e *Error) Error() string + func (e *Error) Format(state fmt.State, _ rune) + func (e *Error) MarshalText() ([]byte, error) + func (e *Error) Unwrap() error + type ErrorCode string + const CodeAttemptsExceeded + const CodeCanceled + const CodeInvalidBound + const CodeInvalidOption + const CodeInvalidSource + const CodeOversized + const CodeShortRead + const CodeSource + type Option func(*Selector) error + func WithMaxAttempts(maxAttempts int) Option + type Secret []byte + func (Secret) Format(state fmt.State, _ rune) + func (Secret) LogValue() slog.Value + func (Secret) MarshalText() ([]byte, error) + func (s Secret) Clear() + type Selector struct + func DefaultSelector() *Selector + func NewSelector(source Source, options ...Option) (*Selector, error) + func (s *Selector) BigInt(ctx context.Context, upper *big.Int) (*big.Int, error) + func (s *Selector) Fill(ctx context.Context, destination []byte) error + func (s *Selector) Index(ctx context.Context, upper uint64) (uint64, error) + type Source interface + ReadContext func(ctx context.Context, destination []byte) (int, error)