Categorygithub.com/starjun/gotools/v2
modulepackage
2.0.3
Repository: https://github.com/starjun/gotools.git
Documentation: pkg.go.dev

# README

gotools

# Functions

AesDecrypt AES解密.
AesEncrypt AES加密,CBC.
No description provided by the author
CheckPort 检验输入字符串端口.
CreateDateDir 创建目录.
DecryptString 解密 字符串.
DomainCheck 判断是否是一个合法域名.
DuplicateIntArray Int数组 去重.
DuplicateStrArray 字符串数组 去重.
EncryptString 加密 字符串.
ExistIntArray Int数组 存在某个数字.
ExistStringArray Str字符串数组 存在某个字符串.
FileMove @author: [songzhibin97](https://github.com/songzhibin97) @function: FileMove @description: 文件移动供外部调用 @param: src string, dst string(src: 源位置,绝对路径or相对路径, dst: 目标位置,绝对路径or相对路径,必须为文件夹) @return: err error.
FloatFormat 格式化浮点数 f 浮点数 v 保留小数位数.
GetDifferentIntArray 差集 Int数组 取出不同元素.
GetDifferentStrArray 差集 Str数组 取出不同元素.
No description provided by the author
GetFileLine 获取文件名和行号.
GetIPList ip 地址转 net.IP ips = "10.0.0.1, 10.0.0.5-10, 192.168.1.*, 192.168.10.0/24".
No description provided by the author
GetUUID 获取uuid 返回uuid字符串(36位).
Int64ConvertToTime int64 to time.
IntersectInt 交集 Int数组取相同的元素.
IntersectStr 交集 Str数组取相同的元素.
IpCidrCheck ip cidr 范围判断 cidrIp = "10.0.0.1, 10.0.0.5-10, 192.168.1.*, 192.168.10.0/24".
IsIp 是否是合法 ipv4 地址 ipv6待增加.
IsIpSegment 是否是ip网段格.
JsonDecode 解析json字符到interface{} v interface{} return: error.
JsonEncode map/sturct转json字符串 v interface{} return: json字符串.
No description provided by the author
No description provided by the author
MatchStr -- 规则判断 sourceStr 被匹配字符串s opt 匹配方式【等于、包含、前缀、后缀、cidr、正则 ...】 []eStr 匹配字符串s.
Md5Sum md5哈希函数 s 字符串 return: MD5哈希字符串.
MergeDuplicateIntArray 并集 合并两个数组并去重.
MergeDuplicateStrArray 并集 合并两个字符串数组并去重.
ParseCurrentMonday 获取最近的周一.
ParseFirstDayOfMonthMorning 当月第一天0点.
ParseHourTimeToInt64 获取int64 小时.
ParseMorningTime 返回某一天的当地时区0点.
ParseSecondTimeToInt64 获取int64 秒.
ParseTimeByTimeStr 时间转换 将1993-12-26 10:30:00转换为time.
ParseTimeToInt64 获取int64 当前时间戳/输入time时间戳.
ParseTimeToTimeStr 把int64转换成1993-12-26 10:30:00.
ParseYesterdayTime 获取传入时间前一天的时间,不传默认是昨天.
PathExists @author: [piexlmax](https://github.com/piexlmax) @function: PathExists @description: 文件目录是否存在 @param: path string @return: bool, error.
No description provided by the author
No description provided by the author
Printf_Color 彩色打印传入 对象.
No description provided by the author
ReadAll 读取所有文件内容.
String_Contains_list 包含列表检查.
String_Prefix_list 开头列表检查.
String_Suffix_list 结尾列表检查.
StructDiffValue 比较两个结构体.
Strval 任意类型转字符串 入参:interface{} return:字符串.
TimeCheck 时间格式检查.
VersionOrdinal 版本号转化.
ZipFiles @author: [piexlmax](https://github.com/piexlmax) @function: ZipFiles @description: 压缩文件 @param: filename string, files []string, oldform, newform string @return: error.

# Structs

No description provided by the author