ptr

package
v0.50.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

ptr provides functions to convert from/to pointers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

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

From dereferences a pointer.

func FromDef

func FromDef[T any](v *T, def T) T

FromDef dereferences a pointer. It returns def if the pointer is nil.

func To

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

To converts a value to pointer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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