models

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 0 Imported by: 1

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 {
	Value T
	Set   bool
}

Optional is a simple generic optional type.

See: https://en.wikipedia.org/wiki/Option_type

func EmptyOptional

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

func OptionalPointer added in v0.2.1

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

func OptionalValue added in v0.2.1

func OptionalValue[T any](value T) Optional[T]

func (Optional[T]) GetOr

func (s Optional[T]) GetOr(defaultValue T) T

Directories

Path Synopsis
pgd

Jump to

Keyboard shortcuts

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