opt

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Optional.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opt

type Opt[T any] struct {
	// contains filtered or unexported fields
}

func New

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

func Nil

func Nil[T any]() Opt[T]

func (*Opt[T]) Get

func (o *Opt[T]) Get() T

func (*Opt[T]) IsNil

func (o *Opt[T]) IsNil() bool

func (*Opt[T]) MayGet

func (o *Opt[T]) MayGet() (T, bool)

Jump to

Keyboard shortcuts

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