Documentation ¶
Index ¶
- func BaseDecimalToN(num int, baseN int) string
- func BaseNToDecimal(baseNum string, baseN int) int
- func BytesToInt(bys []byte) int
- func CamelCase(s string) string
- func Deduplicate(array []any) []any
- func DeduplicateString(array []string) []string
- func GenUUid() string
- func GetInterfaceToInt(t1 any) int
- func GetReqId(c *gin.Context) string
- func IntToBytes(n int) []byte
- func InterfaceToStrArray(interfaceArr []any) []string
- func InterfaceToStruct(i1 any, i2 *any) error
- func MaskSensitiveInfo(s string, start int, maskNumber int, maskChars ...string) string
- func RandFloat(min int, max int, precision int, unsigned bool) float64
- func RandFromArray(array *[]any) any
- func RandFromArrayString(array []string) string
- func RandNumber(min, max float64, precision int) (float64, error)
- func RandNumberByLen(size int) string
- func RandStringByLen(size int) string
- func RoundFloat(num float64, precision int) (float64, error)
- func SnakeCase(s string, allMode bool) string
- func StrToInterfaceArray(stringSlice []string) []any
- func String2Int(strArr []string) []int
- func Struct2map(obj any) (data map[string]any, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BaseDecimalToN ¶
把10进制转N进制 baseN最大56,24存小写字母,32为数字和小写大于32大小字符
func BaseNToDecimal ¶
把N进制转10进制 baseN最大56,24存小写字母,32为数字和小写大于32大小字符
func CamelCase ¶
*
- 蛇形转驼峰
- @description xx_yy to XxYx xx_y_y to XxYY
- @date 2023/10/13
- @param s要转换的字符串
- @return string *
func MaskSensitiveInfo ¶
MaskSensitiveInfo 对于字符串脱敏 s 需要脱敏的字符串 start 从第几位开始脱敏 maskNumber 需要脱敏长度 maskChars 掩饰字符串,替代需要脱敏处理的字符串
func RandFromArrayString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.