ptr

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreAllSet added in v1.9.0

func AreAllSet(in ...*string) bool

AreAllSet returns true if all input strings are not nil and not empty.

func FromType added in v1.9.0

func FromType[T any](in T) *T

FromType returns pointer for a given input type.

func ToSlice added in v1.9.0

func ToSlice[T any](in []*T) []T

ToSlice converts a given slice of pointers to slice with non-nil elems.

func ToValue added in v1.9.0

func ToValue[T Primitives](in *T) T

ToValue returns value for a given pointer input type.

Types

type Primitives added in v1.9.0

Primitives is a constraint that permits any primitive Go types.

Jump to

Keyboard shortcuts

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