Documentation
¶
Index ¶
- func CleanTag(value string) string
- func DerefType(value reflect.Type) reflect.Type
- func DerefTypeOf(value any) reflect.Type
- func DerefValue(value reflect.Value) reflect.Value
- func DerefValueOf(value any) reflect.Value
- func GetRandomFrom[T any](values ...T) T
- func InstantiateSliceElement[T any](value *[]T) *T
- func IsInterface(value reflect.Value) bool
- func IsMap(value reflect.Value) bool
- func IsNil(value reflect.Value) bool
- func IsPointer(value reflect.Value) bool
- func IsSlice(value reflect.Value) bool
- func IsStruct(value reflect.Value) bool
- func Len(value reflect.Value) int
- func LenOf(value any) int
- func MapCopy[K comparable, V any](value map[K]V) map[K]V
- func MapKeys[K comparable, V any](container map[K]V) []K
- func MapSlice[M any, N any](slice []M, handler func(element M) N) []N
- func MapValues[K comparable, V any](container map[K]V) []V
- func NewRandomGenerator() *rand.Rand
- func ParseBool(value string) (bool, error)
- func PointerOf[T any](value T) *T
- func SafeDivide[T Number](v1, v2 T) T
- func SaveToFile(filename string, data []byte) error
- func SliceToMap[M any, K comparable, V any](slice []M, keyHandler func(element M) (K, V)) map[K]V
- func SliceToMultimap[K comparable, V any](slice []V, keyHandler func(element V) K) map[K][]V
- type Number
- type Vector2D
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DerefTypeOf ¶
Dereferences the value if it is a pointer.
func DerefValue ¶
Dereferences the value if it is a pointer.
func DerefValueOf ¶
Dereferences the value if it is a pointer.
func GetRandomFrom ¶
func GetRandomFrom[T any](values ...T) T
func InstantiateSliceElement ¶
func InstantiateSliceElement[T any](value *[]T) *T
func MapCopy ¶
func MapCopy[K comparable, V any](value map[K]V) map[K]V
func MapKeys ¶
func MapKeys[K comparable, V any](container map[K]V) []K
func MapValues ¶
func MapValues[K comparable, V any](container map[K]V) []V
func NewRandomGenerator ¶
func SafeDivide ¶
func SafeDivide[T Number](v1, v2 T) T
func SaveToFile ¶
func SliceToMap ¶
func SliceToMap[M any, K comparable, V any](slice []M, keyHandler func(element M) (K, V)) map[K]V
func SliceToMultimap ¶
func SliceToMultimap[K comparable, V any](slice []V, keyHandler func(element V) K) map[K][]V
Types ¶
Click to show internal directories.
Click to hide internal directories.