ptr

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package ptr provides helper functions to get pointers to basic types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deref added in v1.7.1

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

Deref returns the value pointed to by p. If p is nil, it returns the zero value of type T.

func Point added in v1.6.0

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

Point returns a pointer to the given value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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