package
0.0.0-20231108073916-93b22619600a
Repository: https://github.com/kdcer/go-lib.git
Documentation: pkg.go.dev

# Functions

Arrcmp 查找两个数组的异同.
No description provided by the author
No description provided by the author
摘自 strings.Builder 字节数组转换为字符串.
下载src 远端路径dist 本地路径.
EarthDistance 根据经纬度获取距离 参数:lat1纬度1 lng1经度1 lat2纬度2 lng2经度2 返回距离 米.
判断目录是否存在,不存在返回false.
No description provided by the author
生成随机数据查询sql,先查询总数count,随机获取limit个不重复的offset(从0到count),将这些随机数作为limit的偏移量 ,例如limit 10,1,limit 30,1。sql语句用union all 拼接。 count 有效数据总数 limit 查询的总数 tableName 表名 fields 字段 conditions 条件 order 排序 return 生成的sql.
GetIntersection 获取多个字符串数组的交集.
获取本地ip.
No description provided by the author
GetPastTimeDescribe 获取对过去时间的描述 时间范围 描述 1分钟内 刚刚 1小时内 58分钟前 1天内 23小时前 2天内 昨天 1年内 2020-10-03 1年外 2年前.
GetRand 获取短信验证码随机数.
随机查询数据,根据数据总量和查询数量返回随机数offset切片 count 有效数据总数 limit 查询的总数 return 偏移量切片.
GetTodayLatestTime 获取当天最晚时间.
String hashes a string to a unique hashcode.
隐藏字符 param headLength 开头保留长度 param tailLength 结尾保留长度 param hide 替换隐藏的字符.
初始化邀请码Key,先调用此再编码解码_len 邀请码长度 默认是6.
邮箱 最高30位.
手提电话(不带前缀)最高11位.
IsSameDay 判断是否是同一天.
生成32位md5字串.
创建文件夹.
根据可变string拼接字符串.
No description provided by the author
No description provided by the author
RemoveRepByLoop 通过两重循环过滤重复元素 时间换空间.
RemoveRepByMap 通过map主键唯一的特性过滤重复元素 空间换时间.
No description provided by the author
字符串转换为字节数组.
字符截取指定长度(str原字符串,rep替换字符串,limit长度限制).
结构体互相转换 比gconv.Struct效率高 source源结构体或结构体指针或结构体切片 target目标结构体指针或结构体切片指针 不可用jsoniter库,会有数据没有附加回来.
上传imagePath 本地文件路径staticPath 静态服务器地址.
生成uuid字串 使用此方法获取随机Guid.

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
SECOND_SEC 秒数的值.

# Structs

邮箱配置.

# Interfaces

No description provided by the author

# Type aliases

No description provided by the author