optional

package
v0.0.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Optional

type Optional[T any] interface {
	Value() (T, bool)
	MustValue() T
	Set(value T)
	IsPresent() bool
	ValueOrDefault(def T) T
}

func Default

func Default[T any]() Optional[T]

func New

func New[T any](v T) Optional[T]

Jump to

Keyboard shortcuts

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