Documentation ¶
Index ¶
- func ArrayInterfaceToString(arr []interface{}) []string
- func ArrayToMapInt8(arrOfString []string) map[string]int8
- func Atoi(b []byte) (int, error)
- func BytesToString(b []byte) string
- func BytesToStringUnsafe(b []byte) string
- func CastToBool(v interface{}, defaultValue bool) bool
- func CastToBoolND(v interface{}) bool
- func CastToFloat64(v interface{}, defaultValue float64) float64
- func CastToFloat64ND(v interface{}) float64
- func CastToInt(v interface{}, defaultValue int) int
- func CastToInt64(v interface{}, defaultValue int64) int64
- func CastToInt64ND(v interface{}) int64
- func CastToIntND(v interface{}) int
- func CastToMapInterface(v interface{}, defaultValue map[string]interface{}) map[string]interface{}
- func CastToMapString(v interface{}, defaultValue map[string]string) map[string]string
- func CastToMapStringND(v interface{}) map[string]string
- func CastToString(v interface{}, defaultValue string) string
- func CastToStringND(v interface{}) string
- func CastToStruct[T any](v interface{}, defaultValue T) T
- func CastToStructND[T any](v interface{}, result func(T)) error
- func FindByInMapArray[T string | int | bool](field string, value T, collection []map[string]interface{}) map[string]interface{}
- func Float64ToString(v float64) string
- func GetItemFromMapArray(mapArray []map[string]interface{}, ...) map[string]interface{}
- func GetValueOnMap[K comparable, V any](dict map[K]V, key K, defaultValue V) V
- func InArray[T comparable](arr []T, v T) bool
- func IntToString(v int) string
- func KeyExistsInMap[K comparable, V any](m map[K]V, key K) bool
- func MapInterfaceToMapString(src map[string]interface{}) map[string]string
- func MapMerge[T string | int8 | int16 | int32 | int | interface{}](src map[string]T, dst map[string]T) map[string]T
- func MapToStringArray(value map[string]interface{}, format, separator string) string
- func MergeContextWithCancel(c1, c2 context.Context) (context.Context, context.CancelFunc)
- func NumberInRange[T common.IntegerAll | common.Float](v T, min T, max T) bool
- func NumberInRangeEx[T common.IntegerAll | common.Float](v T, min T, max T) bool
- func ParseFloat(b []byte, bitSize int) (float64, error)
- func ParseInt(b []byte, base int, bitSize int) (int64, error)
- func ParseUint(b []byte, base int, bitSize int) (uint64, error)
- func SliceItems[T any](items []T, page, limit int) []T
- func StringToBytes(s string) []byte
- func StringToBytesUnsafe(s string) []byte
- func StringToInt(v string) int
- func StringToIntDV(v string, dv int) int
- func ToArrayOfInterface[T string | int | int64 | float32 | float64](arrays []T) []interface{}
- func ToMapInterface(src interface{}) map[string]interface{}
- func ToPtr[T any](v T) *T
- func ToStruct[T any](src interface{}, dst *T) *T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayInterfaceToString ¶
func ArrayInterfaceToString(arr []interface{}) []string
func ArrayToMapInt8 ¶
func BytesToString ¶ added in v0.3.0
func BytesToStringUnsafe ¶ added in v0.3.0
BytesToStringUnsafe converts byte slice to string.
func CastToBool ¶
func CastToBoolND ¶
func CastToBoolND(v interface{}) bool
func CastToFloat64 ¶
func CastToFloat64ND ¶
func CastToFloat64ND(v interface{}) float64
func CastToInt64 ¶
func CastToInt64ND ¶
func CastToInt64ND(v interface{}) int64
func CastToIntND ¶
func CastToIntND(v interface{}) int
func CastToMapInterface ¶
func CastToMapString ¶
func CastToMapStringND ¶
func CastToString ¶
func CastToStringND ¶
func CastToStringND(v interface{}) string
func CastToStruct ¶
func CastToStruct[T any](v interface{}, defaultValue T) T
func CastToStructND ¶
func FindByInMapArray ¶
func Float64ToString ¶
func GetItemFromMapArray ¶
func GetValueOnMap ¶
func GetValueOnMap[K comparable, V any](dict map[K]V, key K, defaultValue V) V
func InArray ¶
func InArray[T comparable](arr []T, v T) bool
func IntToString ¶
func KeyExistsInMap ¶ added in v0.3.0
func KeyExistsInMap[K comparable, V any](m map[K]V, key K) bool
func MapInterfaceToMapString ¶
func MapToStringArray ¶
func MergeContextWithCancel ¶
func NumberInRange ¶ added in v0.3.0
func NumberInRange[T common.IntegerAll | common.Float](v T, min T, max T) bool
func NumberInRangeEx ¶ added in v0.3.0
func NumberInRangeEx[T common.IntegerAll | common.Float](v T, min T, max T) bool
func SliceItems ¶
func StringToBytes ¶ added in v0.3.0
func StringToBytesUnsafe ¶ added in v0.3.0
StringToBytesUnsafe converts string to byte slice.
func StringToInt ¶
func StringToIntDV ¶
func ToArrayOfInterface ¶
func ToMapInterface ¶
func ToMapInterface(src interface{}) map[string]interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.