option

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2025 License: MIT Imports: 1 Imported by: 0

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
}

func None

func None[T any]() Option[T]

func Some

func Some[T any](v T) Option[T]

func (Option[T]) Do

func (o Option[T]) Do(f func(T))

func (Option[T]) Or

func (o Option[T]) Or(f func() T) Option[T]

func (Option[T]) OrMaybe

func (o Option[T]) OrMaybe(f func() Option[T]) Option[T]

func (Option[T]) OrValue

func (o Option[T]) OrValue(v T) Option[T]

func (Option[T]) String

func (o Option[T]) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL