Documentation ¶
Index ¶
- func AlignStringMappingArrayFields(data []map[string]string) []map[string]string
- func ChannelAsyncPush[T any](ch chan T, data T)
- func Chunk[T any](data []T, size uint) (result [][]T)
- func Cmd(c CmdOption) (result []byte, err error)
- func CopyStringMapping(data map[string]string) (result map[string]string)
- func CopyStringMappingArray(data []map[string]string) (result []map[string]string)
- func EnvToBool(name string, value bool) bool
- func EnvToInt(name string, value int) int
- func EnvToString(name string, value string) string
- func GetFieldValue(field string, data interface{}) interface{}
- func GetFieldValues(field string, data interface{}) []interface{}
- func InArray[T comparable](array []T, data T) (result bool)
- func InArrayFloat64(data float64, array []float64) bool
- func InArrayInt(data int, array []int) bool
- func InArrayString(data string, array []string) bool
- func IsBool(value interface{}) bool
- func IsDir(f string) bool
- func IsEmpty(value interface{}) bool
- func IsExistsPath(f string) bool
- func IsFloat(value interface{}) bool
- func IsInt(value interface{}) bool
- func IsMap(value interface{}) bool
- func IsNil(value interface{}, traceSource ...bool) bool
- func IsNumber(s string) bool
- func IsSlice(value interface{}) bool
- func IsString(value interface{}) bool
- func IsStruct(value interface{}) bool
- func IsUint(value interface{}) bool
- func Md5(data []byte) string
- func MkDirAll(f string, perm os.FileMode) (err error)
- func PrintMemory(ctx context.Context, interval int64, ...)
- func RandomInt(min, max int) int
- func RandomStr(length int, randomType RandomType) string
- func ReplaceAll(src string, old []string, new string) string
- func SHA1(data string) string
- func ToBool(s string) bool
- func ToFloat32(s string) float32
- func ToFloat64(s string) float64
- func ToInt(s string) int
- func ToInt32(s string) int32
- func ToInt64(s string) int64
- func ToInt8(s string) int8
- func ToString(num interface{}) string
- func ToUint(s string) uint
- func ToUint32(s string) uint32
- func ToUint64(s string) uint64
- func ToUint8(s string) uint8
- func Ucfirst(s string) string
- func UniqueInt64(array []int64) []int64
- func Zip(src string, dest string, ignores ...string) error
- type CmdOption
- type MemoryStatus
- type NumberType
- type RandomType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChannelAsyncPush ¶ added in v0.0.52
func ChannelAsyncPush[T any](ch chan T, data T)
func CopyStringMappingArray ¶
func EnvToString ¶
func GetFieldValue ¶ added in v0.0.52
func GetFieldValue(field string, data interface{}) interface{}
func GetFieldValues ¶ added in v0.0.52
func GetFieldValues(field string, data interface{}) []interface{}
func InArray ¶ added in v0.0.52
func InArray[T comparable](array []T, data T) (result bool)
InArray 数组是否存在该值
func InArrayFloat64 ¶
InArrayFloat64 判断是否在数组中,float64
func InArrayString ¶
InArrayString 判断是否在数组中,string
func IsFloat ¶ added in v0.0.7
func IsFloat(value interface{}) bool
IsFloat checks whether `value` is type of float.
func IsMap ¶ added in v0.0.7
func IsMap(value interface{}) bool
IsMap checks whether `value` is type of map.
func IsSlice ¶ added in v0.0.7
func IsSlice(value interface{}) bool
IsSlice checks whether `value` is type of slice.
func IsStruct ¶ added in v0.0.7
func IsStruct(value interface{}) bool
IsStruct checks whether `value` is type of struct.
func IsUint ¶ added in v0.0.7
func IsUint(value interface{}) bool
IsUint checks whether `value` is type of uint.
func PrintMemory ¶ added in v0.0.52
func RandomStr ¶
func RandomStr(length int, randomType RandomType) string
func ReplaceAll ¶
ReplaceAll 多个字符串同时替换为同一个
func UniqueInt64 ¶
Types ¶
type MemoryStatus ¶ added in v0.0.52
type NumberType ¶ added in v0.0.12
type NumberType uint8
const ( UInt NumberType = iota Int UFloat Float Positive Negative All )
type RandomType ¶
type RandomType uint8
const ( RandomType_All RandomType = iota RandomType_Number RandomType_Char RandomType_LowerChar RandomType_UpperChar RandomType_Symbol RandomType_NumberAndSymbol RandomType_CharAndSymbol )
Click to show internal directories.
Click to hide internal directories.