optional

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 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] struct {
	HasValue bool
	// contains filtered or unexported fields
}

func Empty

func Empty[T comparable]() *Optional[T]

func Of

func Of[T any](value T) *Optional[T]

func OfNonZero

func OfNonZero[T comparable](value T) *Optional[T]

func (*Optional[T]) Get

func (opt *Optional[T]) Get() (v T, ok bool)

Jump to

Keyboard shortcuts

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