Documentation ¶
Overview ¶
Package orerr provides a type OrErr for working with (value, error) pairs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OrErr ¶
type OrErr[V any] struct { // contains filtered or unexported fields }
An OrErr[V] bundles a value of type V with a possibly-nil error. This allows the user to pass around a single value instead of dealing with tuples.
Values can be extracted with Get; callers should check the error as with any other method that returns an error.
Click to show internal directories.
Click to hide internal directories.