Documentation
¶
Index ¶
- func ConvertItem[T any, U any](ts []T, covert func(T) U) []U
- func GetMapKeys[K comparable, V any](m map[K]V) []K
- func GetMapKeysByOrder[K comparable, V any](m map[K]V, order int) K
- func GetMapValues[K comparable, V any](m map[K]V) []V
- func GetMapValuesByOrder[K comparable, V any](m map[K]V, order int) V
- func NewSlice(ts ...any) []any
- func PickRandom[T any](arrays []T) T
- func ToPointerSlice[T any](ts []T) []*T
- func ToValueSlice[T any](ts []*T) []T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertItem ¶ added in v1.2.0
func GetMapKeys ¶
func GetMapKeys[K comparable, V any](m map[K]V) []K
func GetMapKeysByOrder ¶
func GetMapKeysByOrder[K comparable, V any](m map[K]V, order int) K
func GetMapValues ¶
func GetMapValues[K comparable, V any](m map[K]V) []V
func GetMapValuesByOrder ¶
func GetMapValuesByOrder[K comparable, V any](m map[K]V, order int) V
func PickRandom ¶ added in v1.2.0
func PickRandom[T any](arrays []T) T
func ToPointerSlice ¶ added in v1.1.0
func ToPointerSlice[T any](ts []T) []*T
func ToValueSlice ¶ added in v1.1.0
func ToValueSlice[T any](ts []*T) []T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.