pointer

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: GPL-3.0 Imports: 0 Imported by: 2

Documentation

Overview

Package pointer reads and makes the optional fields API models type as *T, where a statement is awkward: inside a literal, an argument or a return.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From[T any](p *T) T

From is the value behind p, or the zero value when there is none: an optional field read without a nil check at every site.

func To

func To[T any](v T) *T

To is a pointer to a copy of v. new(v) does the same since Go 1.26; To stays for a call that reads better named.

Types

This section is empty.

Jump to

Keyboard shortcuts

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