Documentation ¶
Index ¶
- func AND(ands ...bool) bool
- func ArrayInterfaceToString(arr []interface{}) []string
- func ArrayToMapInt8(arrOfString []string) map[string]int8
- 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(dict map[string]interface{}, key string, defaultValue interface{}) interface{}
- func IfE(expr bool, then func(), el func())
- func IfER[T any](expr bool, then func() T, el func() T) T
- func IfEmpty[T string | int](value T, whenEmpty T) T
- func IfErrorThen(err error, run func())
- func IfNil[T string | int | *time.Time | map[string]interface{}](value interface{}, whenNil T) T
- func IfNotEmpty[T string | int](value T, whenNotEmpty T) T
- func IfR[T *any](expr bool, run func() T) T
- func IfRE[T *any](expr bool, run func() (T, error)) (T, error)
- func IfTrueThen(expr bool, run func())
- func Iif[T any](expr bool, whenTrue, whenFalse T) T
- func InArray[T string | int | int64 | uint | uint64 | float32 | float64](arr []T, v T) bool
- func IntToString(v int) string
- 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 OR(ors ...bool) bool
- func SliceItems[T any](items []T, page, limit int) []T
- 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 ValueOnMap[T string | int | int64 | float64 | interface{}](dict map[string]T, key string, defaultValue T) T
- func ValueOnMapByKey[T any](dict map[string]T, key string, defaultValue T) T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayInterfaceToString ¶
func ArrayInterfaceToString(arr []interface{}) []string
func ArrayToMapInt8 ¶
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 IfErrorThen ¶
func IfErrorThen(err error, run func())
func IfNotEmpty ¶
func IfTrueThen ¶
func IfTrueThen(expr bool, run func())
func IntToString ¶
func MapInterfaceToMapString ¶
func MapToStringArray ¶
func MergeContextWithCancel ¶
func SliceItems ¶
func StringToInt ¶
func StringToIntDV ¶
func ToArrayOfInterface ¶
func ToMapInterface ¶
func ToMapInterface(src interface{}) map[string]interface{}
func ValueOnMap ¶
func ValueOnMapByKey ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.