Documentation ¶
Index ¶
- type Option
- func (o Option[T]) Has() bool
- func (o Option[T]) MarshalJSON() ([]byte, error)
- func (o Option[T]) MarshalYAML() (any, error)
- func (o *Option[T]) UnmarshalJSON(data []byte) error
- func (o *Option[T]) UnmarshalYAML(value *yaml.Node) error
- func (o Option[T]) Value() T
- func (o Option[T]) ValueOrDefault(v T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option[T any] []T
func FromNonDefault ¶
func FromNonDefault[T comparable](v T) Option[T]
func (Option[T]) MarshalJSON ¶
func (Option[T]) MarshalYAML ¶
func (*Option[T]) UnmarshalJSON ¶
func (*Option[T]) UnmarshalYAML ¶
func (Option[T]) ValueOrDefault ¶
func (o Option[T]) ValueOrDefault(v T) T
Click to show internal directories.
Click to hide internal directories.