Documentation ¶
Index ¶
- func ByteListHex(byteList []byte) string
- func CheckByteGbk(data []byte) bool
- func CheckNum(str string, strLen int) bool
- func CheckStr(str string, strLen int) bool
- func CheckStrLen(str string, strLen int) bool
- func CheckStrMaxLen(str string, strLen int) bool
- func CheckStrMinLen(str string, strLen int) bool
- func ClientRemoteIpAll(r *http.Request) string
- func ClientRemoteIpOne(r *http.Request) string
- func ExecShell(s string) (out []byte, err error)
- func FormatBytes(bytes uint64) string
- func FormatFileSize(fileSize int64) (size string)
- func GbkToUtf8(s []byte) ([]byte, error)
- func GenValidateCode(width int) string
- func GetMd5String(s string) string
- func If(condition bool, trueVal, falseVal interface{}) interface{}
- func RandStr(n int) string
- func RandStrNum(n int) string
- func RandStrValidateCode(n int) string
- func RandStringRunes(n int) string
- func UniqueId() string
- func Utf8ToGbk(s []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteListHex ¶ added in v0.0.10
func CheckStrLen ¶ added in v0.0.10
CheckStrLen 检查字符串Aa0,判断字符串长度为1-strLen之间
func CheckStrMaxLen ¶ added in v0.0.10
CheckStrMaxLen 检查字符串Aa0,长度最大strLen
func CheckStrMinLen ¶ added in v0.0.10
CheckStrMinLen 检查字符串Aa0,长度最小strLen
func ClientRemoteIpAll ¶ added in v0.0.9
func ClientRemoteIpOne ¶ added in v0.0.9
func FormatBytes ¶ added in v0.0.11
func FormatFileSize ¶ added in v0.0.4
FormatFileSize 根据字节数返回文件大小的字符串形式
func GenValidateCode ¶ added in v0.0.4
func RandStrNum ¶ added in v0.0.7
func RandStrValidateCode ¶ added in v0.0.7
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.