Categorygithub.com/billmi/go-utils
module
2.0.0+incompatible
Repository: https://github.com/billmi/go-utils.git
Documentation: pkg.go.dev

# README

go-utils

go 语言工具库 工具库大部分不依赖第三方包,按目录文件分包管理

文档

GitHub stars GitHub forks GitHub license Go Report Card


目录包名功能简要备注
aes主要是aes加解密 【CBC】
array数组操作,如 : 合并数组,删除数组元素,
数组[]string => []int <=> []int => []string相互转换,
验证字符串或数字是否在数组内
camelcase驼峰转小写 AaBb => aa_bb收集
catch用于抓取错误记录打印(panic信息,不可度量的)[还需完善]
check实现是否为手机号码,是否是身份证号验证
combine笛卡尔组合
cart := [][]string{{"a1", "a2"},{"b1", "b2"},}
结果为 2 * 2 = 4个
convert实现一些字符转换功能,如编/解码二进制,
byte转16进制字符串,16进制字符串转byte等
ddebug打印当前数据调试使用
djson实现json字符串互转,
dmd5md5加密
drand随机数/字符串生成
dstring反转字符串,字符串 <=> 字节互转,字符串是否为中文
dtime处理时间获取比如获取时间戳,时间日期,顺带处理时区的问题
emojiEmoji表情解码,Emoji表情转换
errors错误处理,抛出打印处理使用需要参考测试文件
file文件存在,目录创建,获取目录所有文件夹,获取目录所有文件等
floatformat浮点数与浮点字符串转换,尤其支持保留位填充方式
hbase64baseDecodeString
hcache内存缓存收集整理
helastices基本操作,curd,es版本6.8.0收集整理,适当调整改版
hip返回远程客户端的ip
hreflect获取函数名
hsort这里主要是实现sort string接口排序,其他类型可参照文档实现
hsrsarsa公私密钥加解密
httpsendGet,Post请求发送处理,json RPC2.0 用于filecoin Rpc Api
pagenation总数据,每页显示,当前页数返回总页数信息,附:Mysql偏移Sql语句生成
prototoolsprotobuf转换map[string]interface{}
respo返回数据封装转字符串
savelog写文件日志,这里可以用其他包代替,此包只是用于调试使用[不依赖第三方包]
serializing字符串序列化与反序列化
sign数据填充****
task定时任务仔细看示例[收集整理]
transStruct2Map,结构体转map[string]interface{}
unit字节为单位转换Mib,Gib,Tib,Pib可自己扩展
xorm-helper基于Xorm引擎生成自定义sql与实体curd操作demo,支持常用操作,有需要可以自己扩展不需要使用orm规范进行sql绑定
shellcmdlinux下执行shell指令并返回结果
内部未固定死版本mod,各位使用按需按情况提取包,有组件固定软件版本的地方我在目录会加上说明.
有提交代码,一起维护的朋友,可以直接提交.有空我会来合并,感谢大家支持~!
PS : 有问题请直接修改后提交,有空我会看看

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
from https://github.com/pkg/errors Package errors provides simple error handling primitives.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
key/value 内存缓存,支持基于超时的自动无效功能 */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author