ptr

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreAllSet

func AreAllSet(in ...*string) bool

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

func FromType

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

FromType returns pointer for a given input type.

func ToSlice

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

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

func ToValue

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

ToValue returns value for a given pointer input type.

Types

type Primitives

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