cond

package
v0.0.0-...-0c2e2dc Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2025 License: BSD-3-Clause 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 {
	// Some is set to true when the option has a value.
	Some bool

	// Value is valid if Some is true.
	Value T
}

Option provides an optional value.

func None

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

func Some

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

func (Option[T]) MustGet

func (o Option[T]) MustGet(ifMissing T) T

Jump to

Keyboard shortcuts

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