Documentation ¶
Index ¶
- func AbsFileSize(path string) (int64, string)
- func AppendStrFile(content, filePath string) (n int, err error)
- func ContainsNum(str string) bool
- func ContainsStr(str string, strArr []string) bool
- func CopyFile(dstName, srcName string) (written int64, err error)
- func ExecCommand(command string) ([]byte, error)
- func Exist(path string) error
- func FileSize(path string) (int64, string)
- func FilterEmoji(str string) string
- func GetAbsDir(path string) string
- func GetCurrentDir(path string) string
- func GetGuid() (string, error)
- func GetLocalAdder() string
- func GetParentDir(dirctory string) string
- func GetRandomName() string
- func GetRandomString(lens int) string
- func HTMLEncode(rs string) string
- func IsEmail(b []byte) bool
- func ListDir(dirPath string) (files []string, err error)
- func ListFiles(params ...string) (files []string, err error)
- func Md5(buf []byte) string
- func Md5ToStr(s string) string
- func MergeString(args ...string) string
- func Password(len int, pwdO string) (pwd string, salt string)
- func RandomCreateBytes(n int, alphabets ...byte) []byte
- func ReadAll(filePath string) ([]byte, error)
- func ShowNum(str string) string
- func SizeFormat(size float64) string
- func StrFirstToLower(s string) string
- func StrFirstToUpper(s string) string
- func StrTime(atime int64) string
- func StringExtractNum(str string) string
- func Substr(s string, pos, length int) string
- func TarGz(srcDirPath, destFilePath string) error
- func TimeStamp(str string) int64
- func Token(m map[string]interface{}, name string, time int64) (token string, err error)
- func UnGzip(zipPath, destFolderPath string) (absolutePath string, err error)
- func UnTarGz(srcFilePath, destDirPath string)
- func UnToken(tokenStr, name string) (m map[string]interface{}, errs error)
- func Unicode(rs string) string
- func Unzip(zipPath, destPath string) (err error)
- func WalkDir(dirPath, suffix string) (files []string, err error)
- func WriterFile(sourceFile, destFile string, isDeleteSourceFile bool) (errs error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsFileSize ¶
func ContainsNum ¶
func ContainsStr ¶
func ExecCommand ¶
func GetCurrentDir ¶
func GetLocalAdder ¶
func GetLocalAdder() string
func GetParentDir ¶
func GetRandomName ¶
func GetRandomName() string
func HTMLEncode ¶
func MergeString ¶
* * @des 拼接字符串 * @param args ...string 要被拼接的字符串序列 * @return string
func RandomCreateBytes ¶
RandomCreateBytes generate random []byte by specify chars.
func SizeFormat ¶
func StringExtractNum ¶
func UnTarGz ¶
func UnTarGz(srcFilePath, destDirPath string)
* Ungzip and untar from source file to destination directory you need check file exist before you call this function
func WriterFile ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.