common

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

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

Copy returns a copy of the given pointer

func CopySlice

func CopySlice[T any](v ...*T) []*T

CopySlice returns a slice of copies of the given pointers

func Ptr

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

Ptr returns the pointer to the value passed in.

func PtrSlice

func PtrSlice[T any](v ...T) *[]*T

PtrSlice returns a pointer to a slice of pointers to all of the provided values.

func Val

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

Val returns the value pointed to by the pointer passed in. If the pointer is nil, it returns the zero value of the type.

func ValSlice

func ValSlice[T any](v ...*T) []T

ValSlice returns a slice of values from the given pointers

Types

This section is empty.

Jump to

Keyboard shortcuts

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