# Functions
No description provided by the author
No description provided by the author
BytesToFloat64 converts []byte to float64.
BytesToInt converts []byte to integer.
BytesToInt64 converts []bytes to int64.
camelCase 驼峰转换 string,converts a _ delimited string to camel case e.g.
CamelString 驼峰转换 string , xx_yy to XxYy.
Capitalize 字符首字母大写.
CheckFileIsExist 判断文件是否存在,存在返回 true,不存在返回 false.
CheckPath 检查文件夹是否存在,不存在则创建.
CopyDir 复制文件夹及其中的文件.
CopyFile 复制文件.
EmptyFloder 删除空目录.
EncodeMemberPwd 加密客户密码.
EncodeTime
* 字符串转换为time.Time
*/.
EncodeToken 加密token.
EncodeUserPwd 加密用户密码.
FindEmptyFolder 递归查找空目录.
Float64ToStr converts float64 to string.
formatSourceCode formats source files.
GetAllFile 获取指定路径下特定扩展名的文件名列表.
GetBetweenStr 获取字符串 str在substr之后的.
GetConfigFromPath read config from path and returns struct.
GetDate 时间戳转换获取年月日 2006-01-02.
GetDateFormat 时间戳转换格式获取时间日期.
GetDateMH 时间戳转换获取年月日和时分 2006-01-02 15:04.
GetDateParse 字符串时间转换获取获取年月日时间戳.
GetDirList 获取指定目录下的目录结构树.
GetFileSuffix 获取文件名中的扩展名.
GetGuid 获取Guid方法,获取48位uuid.
GetList map 转换为字符串数组.
GetParentDirectory 获取目录的父目录及余下路径.
GetTimeParse 字符串时间转换获取获取年月日时分时间戳.
GetTree 递归获取树,根据资源父id,tree指针返回.
HTMLEncode html格式编码.
IntToStr converts integer to string.
ListExists判断元素是否在数组内.
ListExists 删除元素是否在数组内.
LockOrDie 加锁文件夹.
MakeDirectory 创建目录,如果不存在的话.
Md5 把字符串转换为md5方法.
MD5 把字节转化为MD5字符串.
PathExists 判断文件或目录是否存在.
RandInt64 取随64位机数.
生成长度为length的随机字符串.
ReadFile 读取文本文件的内容.
ReadLine 读取指定行的内容.
RemoveDuplicatesAndEmpty string数组去重.
RemoveRepeatedElement 数组中删除重复对象.
SetTree 递归获取树,根据资源父id,tree指针返回.
SHA256 为str生成SHA256哈希值.
SliToStr 任意类型的数组转换为字符串,插入 "name",例如:["1", "2", "3", "4"] to "1name2name3name4",Param sl string,params []interface{}return str string.
SnakeString 蛇形转换 string, XxYy to xx_yy.
Strim 去除string空.
StringInSlice 检查数组slice中是否包含字符串v.
StringsJoin string array join.
No description provided by the author
No description provided by the author
StrToFloat64 converts string to float64.
StrToInt converts string to integer.
StrToInt64 converts string to int64.
StrToUint64 converts string to the unsinged int64.
Struct2Map stuct 转 map.
Substr 截取字符串 start 起点下标 length 需要截取的长度.
Substr2 截取字符串 start 起点下标 end 终点下标(不包括).
TypeInt 断言获取int或int64为int,其他类型为0.
TypeInt64 断言获取int或int64为int64,其他类型为0.
Unicode 取字符串unicode.
No description provided by the author
WriteFile 写入文本文件的内容 coverType 为 true 时覆盖写入,为 false 时追加写入.
WriteFileByte 写入字节数据到文件 coverType 为 true 时覆盖写入,为 false 时追加写入.