package
0.0.3
Repository: https://github.com/oldbai555/lbtool.git
Documentation: pkg.go.dev

# README

  • 基础工具包不应该引用别的包

# Functions

AddlrQuotes 加空格 加反引号.
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
Base64FileHeaderMapper 将base64编码后的前三字符传入,返回文件类型.
No description provided by the author
Camel2UnderScore 驼峰转下划线.
ClearBit 清空位.
ClearBit64 清空位.
CreateDir 创建文件夹.
No description provided by the author
No description provided by the author
Day2Second date 20220402.
ECBDecrypt 解码.
ECBEncrypt 编码.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ExternalIP 获取外部ip.
FileExists 文件是否存在.
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
GetCurrentAbPath 最终方案-获取当前程序的绝对路径.
GetDateList 获取需要统计的日期 case params startDate 20220402 case params endDate 20220405.
GetDiffTime 获取距离现在的时间差,单位秒.
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
HasDir 判断文件夹是否存在.
HashStr 哈希字符串.
No description provided by the author
High32 64位高32位值.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Int2ip Convert uint to net.IP.
No description provided by the author
Ip2int Convert net.IP to int64.
No description provided by the author
No description provided by the author
IsSetBit 是否设置指定位.
IsSetBit64 是否设置指定位.
No description provided by the author
JsonEncode 将任意数据JSON序列化.
KindOfData 获取数据的类型.
No description provided by the author
Low32 64位低32位值.
LowerFirst 首字母小写.
No description provided by the author
Make64 32+32组装64.
Map2Struct 用map填充结构.
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
OrmStruct2Map4Update 对比 OrmStruct2Map 会过滤空值.
No description provided by the author
No description provided by the author
No description provided by the author
PluckStructField2IntList 将结构体字段摘取出来转换成数组.
No description provided by the author
No description provided by the author
No description provided by the author
QuoteFieldName 加上反引号.
No description provided by the author
No description provided by the author
ReflectCompareFieldDesc 按传入fieldName 比较.降序.
RemoveSpace 去除空格类字符.
No description provided by the author
No description provided by the author
SetBit 设置位.
SetBit64 设置位.
No description provided by the author
SetupTimezone 设置 time 包默认时区为北京时间.
Slice2MapKeyByStructField 提取Slice结构体的某个字段转换成Map,key field , val Struct.
SliceBasis2MapValueByBool 基本数据类型Slice 转换成 bool Map , key sliceVal , val bool .
SliceStruct2MapKeyFieldValueByBool 提取Slice结构体的某个字段转换成 field-bool Map,key field , val bool.
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
StructToMapV2 将结构体完全转化为 map.
SubStr 截取字符.
No description provided by the author
No description provided by the author
ToSlice 将slice 转换成 []internal{}.
No description provided by the author
No description provided by the author
UnderScore2Camel 下划线转驼峰.
No description provided by the author
UpperFirst 首字母大写.
ValueOfData 获取数据,优化下指针.

# Constants

No description provided by the author
No description provided by the author
* 产生uint64的不重复数 * 0xaabbbbbbbbccccdd 其中aa是project id,bbbbbbbb是当前时间戳, cccc是随机数, dd是这一秒内的计数 * 测试方法: * go test -v * go test -bench=".*" -parallel 100000 * cat result*.txt|sort -n |uniq -c | awk '{if($1 != 1){print $0}}' 没有输出说明没有生成重复的id * 在我的pc(2.7 GHz Intel Core i5/8 GB 1867 MHz DDR3)上压测结果如下: * 10000000 160 ns/op 5.858s * 这种测试条件下,每秒可以产生171w+不重复数字,性能不俗 */.
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
html直接展示base64的图片.
HTTPDelete HTTP DELETE.
HTTPGet HTTP GET.
HTTPHead HTTP HEAD.
HTTPPost HTTP POST.
HTTPPut HTTP PUT.
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
* 产生uint64的不重复数 * 0xaabbbbbbbbccccdd 其中aa是project id,bbbbbbbb是当前时间戳, cccc是随机数, dd是这一秒内的计数 * 测试方法: * go test -v * go test -bench=".*" -parallel 100000 * cat result*.txt|sort -n |uniq -c | awk '{if($1 != 1){print $0}}' 没有输出说明没有生成重复的id * 在我的pc(2.7 GHz Intel Core i5/8 GB 1867 MHz DDR3)上压测结果如下: * 10000000 160 ns/op 5.858s * 这种测试条件下,每秒可以产生171w+不重复数字,性能不俗 */.
No description provided by the author
* 产生uint64的不重复数 * 0xaabbbbbbbbccccdd 其中aa是project id,bbbbbbbb是当前时间戳, cccc是随机数, dd是这一秒内的计数 * 测试方法: * go test -v * go test -bench=".*" -parallel 100000 * cat result*.txt|sort -n |uniq -c | awk '{if($1 != 1){print $0}}' 没有输出说明没有生成重复的id * 在我的pc(2.7 GHz Intel Core i5/8 GB 1867 MHz DDR3)上压测结果如下: * 10000000 160 ns/op 5.858s * 这种测试条件下,每秒可以产生171w+不重复数字,性能不俗 */.
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
* 产生uint64的不重复数 * 0xaabbbbbbbbccccdd 其中aa是project id,bbbbbbbb是当前时间戳, cccc是随机数, dd是这一秒内的计数 * 测试方法: * go test -v * go test -bench=".*" -parallel 100000 * cat result*.txt|sort -n |uniq -c | awk '{if($1 != 1){print $0}}' 没有输出说明没有生成重复的id * 在我的pc(2.7 GHz Intel Core i5/8 GB 1867 MHz DDR3)上压测结果如下: * 10000000 160 ns/op 5.858s * 这种测试条件下,每秒可以产生171w+不重复数字,性能不俗 */.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

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

# Type aliases

No description provided by the author
Format 格式化类型枚举.
HTTPMethod HTTP request method.
Level 日志等级.
No description provided by the author
No description provided by the author