Versions in this module Expand all Collapse all v0 v0.0.2 Apr 10, 2024 v0.0.1 Apr 10, 2024 Changes in this version + const FileMode0644 + const FileMode0755 + var CharArr = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZ") + var NumArr = []byte("1234567890") + func AppendStrToFile(path, content string) (err error) + func Base64Decode(content string) (string, error) + func Base64Encode(content string) string + func ContentToQRCodeStr(content string, level qrcode.RecoveryLevel, size int) (string, error) + func CountDirFiles(dirName string) int + func CreateDir(path string) error + func CreateFileByAllPath(fileName string) error + func FileMD5(file *os.File) (string, error) + func FileMD5ByPath(path string) (string, error) + func GeneratedToken(userID int64, phone string, expire int) (string, error) + func HashPassword(password, salt string) (string, error) + func HttpGet(ctx context.Context, url string, headers map[string]string, ...) ([]byte, error) + func HttpPostJson(ctx context.Context, url string, headers map[string]string, body interface{}, ...) ([]byte, error) + func InterfaceToStr(value interface{}) string + func IsDir(path string) bool + func IsExist(path string) bool + func MkFileFullPathDir(fileName string) error + func ParseToken(tokenString string) (int64, string, error) + func RandCharStr(n int) string + func RandNumStr(n int) string + func ReadFileToBytes(path string) ([]byte, error) + func ReadFileToLines(path string) ([]string, error) + func SplitStrToSubStrArr(s string, l int) []string + func StrToUint64(str string) uint64 + func StrToUint64E(str string) (uint64, error) + func Tar(src, dst, trimPrefix string) error + func Untar(src, dst string) error + func ValueIsBlank(value reflect.Value) bool + func ValueMd5(value interface{}) string + func WriteToFile(content interface{}, path string) error + type Claims struct + Phone string + UserID int64 + type FileInfo struct + Path string + func AllFilesInDir(path string) ([]FileInfo, error)