optional

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: GPL-3.0 Imports: 1 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 {
	IsPresent() bool
	Get() T
	GetOrDefault(defaultValue T) T
}

func Empty

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

func Of

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

func Pointer

func Pointer[T any](v *T) Optional[T]

Jump to

Keyboard shortcuts

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