Documentation
¶
Index ¶
- func CopyPointer[T any](valPtr *T) *T
- func GetMapFromSliceByField[Obj any, Field comparable](slice []Obj, getField func(Obj) Field) map[Field]Obj
- func GetPointer[T any](val T) *T
- func GetValueFromPointer[T any](val *T, defaultVal T) T
- func SliceToInt[T constraints.Integer](val []T) []int
- func StringTruncate(text string, limit int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyPointer ¶
func CopyPointer[T any](valPtr *T) *T
func GetMapFromSliceByField ¶ added in v1.0.2
func GetMapFromSliceByField[Obj any, Field comparable](slice []Obj, getField func(Obj) Field) map[Field]Obj
func GetPointer ¶
func GetPointer[T any](val T) *T
func GetValueFromPointer ¶
func GetValueFromPointer[T any](val *T, defaultVal T) T
func SliceToInt ¶
func SliceToInt[T constraints.Integer](val []T) []int
func StringTruncate ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.