extstd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache[T any] interface {
	Valid() bool
	Unwrap() T
}

func NewCache

func NewCache[T any](value T, duration time.Duration) Cache[T]

type Option

type Option[T any] interface {
	Unwrap() T
	UnwrapOr(defaultValue T) T
	IsSome() bool
	IsNone() bool
}

func None

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

None creates a new Option without a value.

func Some

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

Some creates a new Option with a value.

Jump to

Keyboard shortcuts

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