Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option[T any] struct { // contains filtered or unexported fields }
Option represents a values that represents a values existence.
nil is usually used on Go however this has two problems: 1. Checking if the return values is nil is NOT enforced and can lead to panics. 2. Using nil is not good enough when nil itself is a valid value.
func (Option[T]) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Option[T]) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.