Documentation ¶
Index ¶
- func FindBalanceDecimalPlace(text string) (decimalPlace int, intPart string, fractionalPart string, err error)
- func GetFunctionName(i interface{}) string
- func GroupBy[T any, KEY comparable](items []T, keyGetter func(*T) KEY) map[KEY][]T
- func GroupByWithSize[T any, KEY comparable](items []T, keyGetter func(*T) KEY, groupSize int) (groupMap map[KEY][]T)
- func IntersecArea(rect1, rect2 []float64) float64
- func IsWordInText(text string, words ...string) bool
- func LevenshteinPercentage(s1, s2 string) float64
- func ListFilter[E any](items []E, filterFn func(i int, e E) bool) []E
- func ListFilterPointer[E any](items []E, filterFn func(i int, e *E) bool) []E
- func ListFindFirst[T any](items []T, matchFn func(e T) bool) (_ T, ok bool)
- func ListMap[S any, D any](items []S, mapFn func(i int, e S) D) []D
- func ListMapPointer[S any, D any](items []S, mapFn func(i int, e *S) D) []D
- func ListMapWithError[S any, D any](items []S, mapFn func(i int, e S) (D, error)) ([]D, error)
- func ListMerge[T any](lists ...[]T) []T
- func ListReduce[E any, AGG any](items []E, initValue AGG, reduceFn func(result AGG, e E) AGG) AGG
- func ListReducePointer[E any, AGG any](items []E, initValue AGG, reduceFn func(result AGG, e *E) AGG) AGG
- func ListToMap[E any, K comparable, V any](items []E, mapFn func(i int, e E) (K, V)) map[K]V
- func ListToMapPointer[S any, K comparable, V any](items []S, mapFn func(i int, e *S) (K, V)) map[K]V
- func MapKeys[K comparable, V any](m map[K]any) []K
- func MapToList[K comparable, V any, E any](m map[K]V, mapFn func(k K, v V) E) []E
- func MapUpdate[K comparable, V any](left map[K]V, right map[K]V) map[K]V
- func MapValues[K comparable, V any](m map[K]V) []V
- func NormalizeBalance(text string) (balance decimal.Decimal, err error)
- func NormalizeString(text string) (result string)
- func NormalizeVietnamese(text string) (result string)
- func NormalizeVietnameseName(text string) (result string)
- func PanicOnError(err error)
- func ParallelRun(ctx context.Context, size int, processor ...func(ctx context.Context) error) (err error)
- func ParallelRunGlobal(ctx context.Context, size int, processor ...func(ctx context.Context) error) (err error)
- func ReactSquare(rect []float64) float64
- func RectIOU(rect1, rect2 []float64) float64
- func RemoveCurrencyIndicators(text string) string
- func ReplaceAcronyms(text string) string
- func Stringify(v any) string
- func ToError(v any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindBalanceDecimalPlace ¶
func GetFunctionName ¶
func GetFunctionName(i interface{}) string
func GroupBy ¶
func GroupBy[T any, KEY comparable](items []T, keyGetter func(*T) KEY) map[KEY][]T
func GroupByWithSize ¶
func GroupByWithSize[T any, KEY comparable](items []T, keyGetter func(*T) KEY, groupSize int) ( groupMap map[KEY][]T, )
func IntersecArea ¶
func IsWordInText ¶
func LevenshteinPercentage ¶
func ListFilter ¶
func ListFilterPointer ¶
func ListFindFirst ¶
func ListMapPointer ¶
func ListMapWithError ¶
func ListReduce ¶
func ListReducePointer ¶
func ListToMap ¶
func ListToMap[E any, K comparable, V any](items []E, mapFn func(i int, e E) (K, V)) map[K]V
func ListToMapPointer ¶
func ListToMapPointer[S any, K comparable, V any](items []S, mapFn func(i int, e *S) (K, V)) map[K]V
func MapKeys ¶
func MapKeys[K comparable, V any](m map[K]any) []K
func MapToList ¶
func MapToList[K comparable, V any, E any](m map[K]V, mapFn func(k K, v V) E) []E
func MapUpdate ¶
func MapUpdate[K comparable, V any](left map[K]V, right map[K]V) map[K]V
MapUpdate updates the data from the right map to the left one.
func MapValues ¶
func MapValues[K comparable, V any](m map[K]V) []V
func NormalizeString ¶
func NormalizeVietnamese ¶
func NormalizeVietnameseName ¶
func PanicOnError ¶
func PanicOnError(err error)
func ParallelRun ¶
func ParallelRunGlobal ¶
func ReactSquare ¶
func ReplaceAcronyms ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.