ptr

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatPtr

func FormatPtr[T comparable](p *T) string

FormatPtr will format the value pointed by p using "%v". It will format it as "<nil>" if p is nil.

func ToPtr

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

ToPtr returns a pointer to v.

func ToValue

func ToValue[T comparable](p *T) (v T)

ToValue returns the value referenced by p. Returns a zero value if p is nil.

Types

This section is empty.

Jump to

Keyboard shortcuts

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