Documentation
¶
Overview ¶
A simple package to cast between types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsZero ¶
func IsZero[T comparable](v T) bool
IsZero returns true if the given value is the zero value of its type.
func PtrSlice ¶
func PtrSlice[T any](slice ...T) []*T
PtrSlice casts an interface to a slice of pointers.
func Slice ¶ added in v0.2.0
func Slice[T any](val interface{}) []T
Slice casts any interface to a slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.