{"modulePath":"github.com/FJSDS/common","version":"v0.0.0-20210522145143-a5d50129da89","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package utils\n\n## Variables\n\n```go\nvar Base62DecodeMin6Max11 = Base62Decode\n```\n\n## Functions\n\n```go\nfunc Base34Decode(bs []byte) uint64\n```\n\n```go\nfunc Base34DecodeString(str string) uint64\n```\n\n```go\nfunc Base34Encode(id uint64) []byte\n```\n\n```go\nfunc Base34EncodeToString(id uint64) string\n```\n\n```go\nfunc Base62Decode(token string) int64\n```\nconverts base62 token to int\n\n```go\nfunc Base62Encode(number int64) string\n```\nconverts number to base62\n\n```go\nfunc Base62EncodeMin6Max11(number int64) string\n```\n\n```go\nfunc BytesToString(b []byte) string\n```\n\n```go\nfunc CheckAndCreate(path string) error\n```\nCheckAndCreate 检查文件或者目录是否存在，不存在则创建 error==nil,创建成功,否则创建失败\n\n```go\nfunc CheckIsSameIP(addr string, selfIPS ...string) string\n```\n\n```go\nfunc CheckPathExists(path string) bool\n```\nCheckPathExists 检查文件目录是否存在 存在返回true,否则返回false\n\n```go\nfunc CreateCaptcha() (id, data string)\n```\n\n```go\nfunc CreateCaptchaWithWH(width, height int64) (id, data string)\n```\n\n```go\nfunc CreatePath(path string) error\n```\nCreatePath 递归创建文件 error==nil,创建成功,否则创建失败 内部调用 MkdirAll\n\n```go\nfunc DesDecrypt(crypt, key []byte) ([]byte, error)\n```\n\n```go\nfunc DesEncrypt(origData, key []byte) ([]byte, error)\n```\n\n```go\nfunc EncodeNumString(src string) string\n```\n\n```go\nfunc GetDirFromPath(path string) string\n```\nGetDirFromPath 从path获取当前文件所在目录 返回目录路径\n\n```go\nfunc GetFileNameFromPath(path string) string\n```\nGetDirFromPath 从path获取当前文件名字 返回文件名字\n\n```go\nfunc I64ToStr(i int64) string\n```\n\n```go\nfunc InitRedisCaptchaStore(client redis.Cmdable)\n```\n\n```go\nfunc MD5Bytes(bs []byte) string\n```\n\n```go\nfunc MD5String(str string) string\n```\n\n```go\nfunc MD5StringUpper(str string) string\n```\n\n```go\nfunc NewLogFileName(serverName string, addr string) string\n```\n\n```go\nfunc PKCS5Padding(cipherText []byte, blockSize int) []byte\n```\nECB PKCS5Padding\n\n```go\nfunc PKCS5UNPadding(origData []byte) []byte\n```\nECB PKCS5UNPadding\n\n```go\nfunc Recover(panicPrint func(e interface{}))\n```\n\n```go\nfunc RecoverWithFunc(panicPrint func(e interface{}), f func())\n```\n\n```go\nfunc SafeGO(errF func(interface{}), f func())\n```\n\n```go\nfunc StringToBytes(s string) []byte\n```\n\n```go\nfunc StringToBytesNotNil(s string) []byte\n```\n\n```go\nfunc TrimLeftRight(str string) string\n```\n\n```go\nfunc TripleEcbDesDecrypt(crypt, key []byte) ([]byte, error)\n```\n\\[golang ECB 3DES Decrypt]\n\n```go\nfunc TripleEcbDesEncrypt(origData, key []byte) ([]byte, error)\n```\n\\[golang ECB 3DES Encrypt]\n\n```go\nfunc VerifyCaptcha(idKey, verifyValue string) bool\n```\n\n```go\nfunc WalkFiles(fileDir string, suffix ...string) ([]string, error)\n```\n\n## Types\n\n```go\ntype Duration struct {\n\ttime.Duration\n}\n```\n\n```go\nfunc (d *Duration) FromString(str string) error\n```\nFromString 从字符串解析Duration，例如：5s,7m,9ms\n\n```go\nfunc (d *Duration) MarshalText() string\n```\n\n```go\nfunc (d *Duration) UnmarshalText(text []byte) error\n```\n\n```go\ntype HTTPHeader struct {\n\thttp.Header\n}\n```\n\n```go\nfunc NewHTTPHeader() *HTTPHeader\n```\n\n```go\nfunc (this_ *HTTPHeader) Add(key string, value interface{}) *HTTPHeader\n```\n\n```go\nfunc (this_ *HTTPHeader) Del(key string) *HTTPHeader\n```\n\n```go\nfunc (this_ *HTTPHeader) Len() int64\n```\n\n```go\nfunc (this_ *HTTPHeader) Nil() bool\n```\n\n```go\nfunc (this_ *HTTPHeader) Set(key string, value interface{}) *HTTPHeader\n```\n\n```go\ntype RedisStore struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (this_ *RedisStore) Get(id string, clear bool) string\n```\n\n```go\nfunc (this_ *RedisStore) Set(id string, value string)\n```\n\n```go\ntype SpinLock struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (l *SpinLock) Lock()\n```\n\n```go\nfunc (l *SpinLock) Unlock()\n```\n\n```go\ntype URLValues struct {\n\turl.Values\n}\n```\n\n```go\nfunc NewURLValues() *URLValues\n```\n\n```go\nfunc (this_ *URLValues) Add(key string, value interface{}) *URLValues\n```\n\n```go\nfunc (this_ *URLValues) Clone() *URLValues\n```\n\n```go\nfunc (this_ *URLValues) Del(key string) *URLValues\n```\n\n```go\nfunc (this_ *URLValues) Encode() string\n```\n\n```go\nfunc (this_ *URLValues) Len() int64\n```\n\n```go\nfunc (this_ *URLValues) Nil() bool\n```\n\n```go\nfunc (this_ *URLValues) RawEncode() string\n```\n\n```go\nfunc (this_ *URLValues) Set(key string, value interface{}) *URLValues\n```\n\n```go\nfunc (this_ *URLValues) SortRawEncode() string\n```\n\n","path":"github.com/FJSDS/common/utils","name":"utils","synopsis":"","isRedistributable":true}
