ptr

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ptr provides small generic pointer helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clone

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

Clone returns a pointer to a copy of *p, or nil if p is nil.

func Deref

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

Deref returns *p, or the zero value of T if p is nil.

func Of

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

Of returns a pointer to a copy of v.

Types

This section is empty.

Jump to

Keyboard shortcuts

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