Categorygithub.com/jaydenwen123/go-util
modulepackage
0.0.0-20210115085038-29ef5f0298c0
Repository: https://github.com/jaydenwen123/go-util.git
Documentation: pkg.go.dev

# README

go-util

Build Status

this is the golang language utility library.which contains http download file 、 send request with any methods(get,post,put,delete)、create empty directory、regexp、jsondump、jsonload、calc program cost time and so on...

# Functions

AesDecrypt 解密算法.
AesEncrypt 加密算法.
AppendData2File 追加数据到文件中.
Bytes2Str byte数组直接转成string对象,不发生内存copy.
No description provided by the author
No description provided by the author
Came2Snake 从大小写转驼峰_.
回退网络模式 */.
No description provided by the author
根据url下载图片、视频等二进制文件.
No description provided by the author
设置下载失败时的请求次数.
ExecShell 执行shell命令.
GetAllInterfaceIps 获取所有网卡的ip信息.
GetCurrentProcessName 获取当前进程的名字,支持绝对路径和相对路径两种 /usr/local/hello ./hello.
GetLocalAddress 获取当前机器的ip地址,默认取得是eth1网卡.
GetLocalAddressByIterface 根据网卡名字获取ip.
初始化目录,目录不存在则创建,如果存在则直接跳过.
No description provided by the author
No description provided by the author
No description provided by the author
IsExist 判断文件或者目录存在.
从json文件中恢复出golang对象.
LoadObjFromJsonStr 将jsonStr字符串转为go对象.
根据html字节内容生成markdown文件htmlData:html字节内容markdownFile:markdown文件名.
根据html文件生成markdown文件htmlFile:html文件名markdownFile:markdown文件名.
根据html字符串生成markdown文件htmlStr:html字符串markdownFile:markdown文件名.
<h1 onclick="GotoUrl\('/comming'\)" class="trtop">false</h1><h1 onclick="GotoUrl\('/comming'\)" class="trtop">(.*?)</h1>.
<h1 onclick="GotoUrl\('/comming'\)" class="trtop">4.45</h1><h1 onclick="GotoUrl\('/comming'\)" class="trtop">(.*?)</h1>.
<h1 onclick="GotoUrl\('/comming'\)" class="trtop">445</h1><h1 onclick="GotoUrl\('/comming'\)" class="trtop">(.*?)</h1>.
No description provided by the author
正则表达式匹配目标.
No description provided by the author
将对象转换成不带缩进格式的json字符串.
将对象转换成带缩进格式的json字符串.
将对象转换成不带缩进的xml字符串.
将对象转换成带缩进的xml字符串.
补码.
去码.
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
No description provided by the author
No description provided by the author
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
通过get发送请求,返回数据第一个参数为字节数组,第二个参数为默认编码为utf-8的字符串.
保存成json文件.
保存成json文件.
保存成xml文件.
保存成xml文件.
保存json字符串到文件.
SetHeader 解决跨域.
string转[]byte无拷贝.
No description provided by the author
No description provided by the author
TrimIllegalStr 去除文件名中的非法字符.
正则表达式去除空格.
Uint82Str uint8数组直接转成string对象,不发生内存copy.
转换为大驼峰命名法则 首字母大写,“_” 忽略后大写 */.
WriteData2File 将数据写入到文件.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Cost.