Documentation
¶
Index ¶
- func IsSome[T any](opt *Option[T]) bool
- func Or[T any](v1 *Option[T], f func() T) T
- func OrValue[T any](v1 *Option[T], value T) T
- func Unwrap[T any]() func(*Option[T]) T
- type IOption
- type Option
- func Filter[T any](v *Option[T], f func(T) bool) *Option[T]
- func FlatMap[T any, R any](v1 *Option[T], f func(T) *Option[R]) *Option[R]
- func Map[T any, R any](v1 *Option[T], f func(T) R) *Option[R]
- func MapMaybe[T any, R any](v1 T, f func(T) R) *Option[R]
- func None[T any]() *Option[T]
- func Of[T any](it T) *Option[T]
- func OrElse[T any](v1 *Option[T], f func() *Option[T]) *Option[T]
- func Some[T any](it T) *Option[T]
- func (this *Option[T]) Debug()
- func (this *Option[T]) Empty() bool
- func (this *Option[T]) Filter(f func(T) bool) *Option[T]
- func (this *Option[T]) Foreach(f func(T)) *Option[T]
- func (this *Option[T]) Get() T
- func (this *Option[T]) GetValue() interface{}
- func (this *Option[T]) IfEmpty(f func()) *Option[T]
- func (this *Option[T]) IfNonEmpty(f func(T)) *Option[T]
- func (this *Option[T]) IsEmpty() bool
- func (this *Option[T]) IsNone() bool
- func (this *Option[T]) IsOption() bool
- func (this *Option[T]) IsSome() bool
- func (this *Option[T]) NonEmpty() bool
- func (this *Option[T]) Or(v T) T
- func (this *Option[T]) OrElse(f func() *Option[T]) *Option[T]
- func (this *Option[T]) OrNil() T
- func (this *Option[T]) OrPanic(msg string) T
- func (this *Option[T]) Resolve(fnone func(), fsome func(T)) *Option[T]
- func (this *Option[T]) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶
type Option[T any] struct { // contains filtered or unexported fields }
func (*Option[T]) IfNonEmpty ¶
Click to show internal directories.
Click to hide internal directories.