Documentation ¶ Index ¶ type Some func Empty[T any]() Some[T] func Of[T any](val T) Some[T] func (o Some[T]) Get() (T, bool) func (o Some[T]) IfPresent(callback func(T)) func (o Some[T]) IsPresent() bool func (o Some[T]) OrElse(val T) T func (o Some[T]) OrElseFunc(gen func() T) T func (o Some[T]) OrPanic(errs ...error) T func (o *Some[T]) UnmarshalYAML(value *yaml.Node) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Some ¶ type Some[T any] struct { // contains filtered or unexported fields } func Empty ¶ func Empty[T any]() Some[T] func Of ¶ func Of[T any](val T) Some[T] func (Some[T]) Get ¶ func (o Some[T]) Get() (T, bool) func (Some[T]) IfPresent ¶ func (o Some[T]) IfPresent(callback func(T)) func (Some[T]) IsPresent ¶ func (o Some[T]) IsPresent() bool func (Some[T]) OrElse ¶ func (o Some[T]) OrElse(val T) T func (Some[T]) OrElseFunc ¶ func (o Some[T]) OrElseFunc(gen func() T) T func (Some[T]) OrPanic ¶ func (o Some[T]) OrPanic(errs ...error) T func (*Some[T]) UnmarshalYAML ¶ added in v0.3.72 func (o *Some[T]) UnmarshalYAML(value *yaml.Node) error Source Files ¶ View all Source files optional.go Click to show internal directories. Click to hide internal directories.