Documentation ¶ Index ¶ type Option func Fmap[T any, R any](opt Option[T], f func(x T) R) Option[R] func None[T any]() Option[T] func Some[T any](x T) Option[T] func (opt Option[T]) IsSome() bool func (opt *Option[T]) Replace(x T) func (opt Option[T]) ToString() string func (opt Option[T]) Unwrap() T func (opt Option[T]) UnwrapOr(defa T) T 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 } func Fmap ¶ func Fmap[T any, R any](opt Option[T], f func(x T) R) Option[R] func None ¶ func None[T any]() Option[T] func Some ¶ func Some[T any](x T) Option[T] func (Option[T]) IsSome ¶ func (opt Option[T]) IsSome() bool func (*Option[T]) Replace ¶ func (opt *Option[T]) Replace(x T) func (Option[T]) ToString ¶ func (opt Option[T]) ToString() string func (Option[T]) Unwrap ¶ func (opt Option[T]) Unwrap() T func (Option[T]) UnwrapOr ¶ added in v0.0.10 func (opt Option[T]) UnwrapOr(defa T) T UnwrapOr returns the wrapped value or the default value <defa> Source Files ¶ View all Source files option.go Click to show internal directories. Click to hide internal directories.