Documentation ¶
Overview ¶
Package option provides optional (nullable) types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
Option represents an optional (nullable) type. If Valid is true, Option represents Value. Otherwise, it represents a null/unset/invalid value.
func (*Option[T]) Or ¶
func (o *Option[T]) Or(or T) T
Or returns the value of the option if it is not marked as null/unset/invalid, and otherwise it returns the given value.
func (*Option[T]) ShouldDisplay ¶ added in v0.2.1
func (*Option[T]) ShouldSave ¶ added in v0.2.1
Click to show internal directories.
Click to hide internal directories.