Documentation ¶
Index ¶
- func ComparePwd(hashPwd string, plainPwd []byte) bool
- func Contains(array interface{}, val interface{}) (index int)
- func Convert(array interface{}) string
- func FirstElement(args []string) string
- func FirstLower(s string) string
- func FirstUpper(s string) string
- func GetClientIP(c *gin.Context) string
- func GetFuncName(i interface{}, seps ...rune) string
- func GetKeys(m map[string]string) []string
- func GetSum(m []int) int
- func GetTotalPage(total, size int) int
- func GetValues(m map[string]string) []string
- func HashAndSalt(pwd []byte) string
- func Int64ToInt(num int64) int
- func IntToBool(num int8) bool
- func MD5(str []byte, b ...byte) string
- func MaheHump(s string) string
- func RandomNumber(length int) string
- func ReturnQ(length int) string
- func SliceAfter(str string, substr string) string
- func SliceBefore(str string, substr string) string
- func StructColumn(desk, input interface{}, columnKey, indexKey string) (err error)
- func TrimSpace(text string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstElement ¶
FirstElement 安全地获取 args[0],避免 panic: runtime error: index out of range
func FirstLower ¶
func FirstUpper ¶
func GetClientIP ¶
func GetTotalPage ¶
func Int64ToInt ¶
func StructColumn ¶
实现 php 中的array_column 方法 @param desk [slice|map] 指针类型,方法最终的存储位置 @param input []struct,待转换的结构体切片 @param columnKey string @param indexKey string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.