Documentation ¶ Index ¶ func Unwrap[T any](r Result[T]) (T, error) type Result func Err(err error) Result[any] func Ok[T any](ok T) Result[T] func Wrap[T any](ok T, err error) Result[T] func (r Result[T]) IsErr() bool func (r Result[T]) IsOk() bool func (r Result[T]) Unwrap() (T, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Unwrap ¶ func Unwrap[T any](r Result[T]) (T, error) Types ¶ type Result ¶ type Result[T any] struct { Ok T Err error } func Err ¶ func Err(err error) Result[any] func Ok ¶ func Ok[T any](ok T) Result[T] func Wrap ¶ func Wrap[T any](ok T, err error) Result[T] func (Result[T]) IsErr ¶ func (r Result[T]) IsErr() bool func (Result[T]) IsOk ¶ func (r Result[T]) IsOk() bool func (Result[T]) Unwrap ¶ func (r Result[T]) Unwrap() (T, error) Source Files ¶ View all Source files result.go Click to show internal directories. Click to hide internal directories.