Documentation
¶
Overview ¶
Package ptr contains the ptr.To function.
Deprecated: Use Go 1.26's new(value) expression instead. See https://go.dev/doc/go1.26#language.
Index ¶
- func To[T any](v T) *Tdeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func To
deprecated
func To[T any](v T) *T
To returns a pointer to a shallow copy of v.
Deprecated: Use Go 1.26's new(value) expression instead. For example, ptr.To(42) can be written as new(42). See https://go.dev/doc/go1.26#language.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.