optional

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: GPL-3.0 Imports: 0 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 Empty

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

func New

func New[T any](value T) Option[T]

func Some

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

func (Option[T]) Get

func (o Option[T]) Get() T

func (Option[T]) IsEmpty

func (o Option[T]) IsEmpty() bool

Jump to

Keyboard shortcuts

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