Documentation ¶
Index ¶
- func Base58Decode(input []byte) []byte
- func Base58Encode(input []byte) []byte
- func CheckError(err error)
- func CheckFatal(err error)
- func GetMimeType(name string) string
- func Iif(expr bool, trueVal interface{}, falseVal interface{}) interface{}
- func RandByte(length int) []byte
- func RandHumanStr(length int) string
- func ReverseBytes(data []byte)
- func ToCamelString(s string) string
- func ToInt(value interface{}, defVal ...int) int
- func ToInt64(value interface{}, defVal ...int64) int64
- func ToSnakeString(s string) string
- func ToString(value interface{}, defVal ...string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Iif ¶ added in v0.2.5
func Iif(expr bool, trueVal interface{}, falseVal interface{}) interface{}
Iif 模拟三元运算符
func RandHumanStr ¶ added in v0.2.23
RandHumanStr 获取便于人类识别的随机字符串(避开了易混淆的字符1l0O等)
func ToInt64 ¶
ToInt64 转换为int64类型 value 可以是数字、数字字符串 如果value不能转换为数字,则返回默认值defVal defVal 提供默认值,如果没有,则视为0
func ToSnakeString ¶
snake string, XxYy to xx_yy , XxYY to xx_yy
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.