optional

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package optional contains small helpers for generated optional fields.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NonZero

func NonZero[T comparable](value T) *T

NonZero returns a pointer to value, or nil when value is its zero value.

func Value

func Value[T any](value *T) T

Value returns the pointed-to value, or its zero value for nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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