Documentation ¶
Index ¶
- func Any[T any](list []T, condition func(item *T) bool) bool
- func AppendMaps[TKey comparable, TValue any](to_map, from_map map[TKey]TValue) map[TKey]TValue
- func Filter[T any](items []T, condition func(item *T) bool) []T
- func FilterAndTransform[T_input, T_output any](items []T_input, conditional_transformer func(item *T_input) (bool, T_output)) []T_output
- func FloatDateToString(time_val float64) string
- func ForEach[T any](items []T, do func(item *T)) []T
- func In[T any](item T, list []T, condition func(a, b *T) bool) bool
- func Index[T any](item T, list []T, compare func(a, b *T) bool) int
- func IndexAny[T any](list []T, condition func(item *T) bool) int
- func IntDateToString(time_val int64) string
- func MapToArray[TKey comparable, TValue any](list map[TKey]TValue) ([]TKey, []TValue)
- func PrintTable[T any](contents []T, headers []string, fields func(item *T) []string)
- func Reduce[T any](items []T, reduce func(a, b T) T) T
- func SafeSlice[T any](array []T, start, noninclusive_end int) []T
- func ToJsonString(val any) string
- func Transform[T_input, T_output any](items []T_input, transformer func(item *T_input) T_output) []T_output
- func TruncateTextWithEllipsis(text string, max_len int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendMaps ¶
func AppendMaps[TKey comparable, TValue any](to_map, from_map map[TKey]TValue) map[TKey]TValue
func FilterAndTransform ¶
func FloatDateToString ¶
func IntDateToString ¶
func MapToArray ¶
func MapToArray[TKey comparable, TValue any](list map[TKey]TValue) ([]TKey, []TValue)
func PrintTable ¶
func ToJsonString ¶
func Transform ¶
func Transform[T_input, T_output any](items []T_input, transformer func(item *T_input) T_output) []T_output
func TruncateTextWithEllipsis ¶
string utilities
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.