package
0.16.0
Repository: https://github.com/alecthomas/types.git
Documentation: pkg.go.dev

# Functions

From returns an Option that contains a value if ok is true, otherwise None.
Nil returns an Option that is invalid if the value is nil, otherwise the value.
None returns an Option that contains nothing.
Ptr returns an Option that is invalid if the pointer is nil, otherwise the dereferenced pointer.
Some returns an Option that contains a value.
Zero returns an Option that is invalid if the value is the zero value, otherwise the value.

# Structs

An Option type is a type that can contain a value or nothing.