sys

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(trap uintptr, params int, errnos ...Value) *syscall

New creates a new syscall instance. trap: The syscall number. params: The number of expected parameters. errnos: Optional error values mapped to specific error numbers.

Types

type Err

type Err[T errnoValue] struct{}

func (Err[T]) Unwrap

func (e Err[T]) Unwrap() error

type Errno

type Errno struct {
	// contains filtered or unexported fields
}

func (Errno) Error

func (e Errno) Error() string

func (Errno) Temporary

func (e Errno) Temporary() bool

func (Errno) Timeout

func (e Errno) Timeout() bool

func (Errno) Unwrap

func (e Errno) Unwrap() error

type Errnos

type Errnos map[unix.Errno]Value

func NewErrnos

func NewErrnos(errs []Value) Errnos

func (Errnos) Get

func (e Errnos) Get(errno unix.Errno) error

Get retrieves an error associated with a given unix.Errno. Returns nil if errno is 0, or the original errno if it is not mapped.

type Value

type Value interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL