package
2.0.1+incompatible
Repository: https://github.com/livegoplayer/go_helper.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
No description provided by the author
切片中的所有元素是否都满足指定方法.
判断一堆基础类型的值是不是都是空.
切片中是否存在满足指定方法的元素,如果不传方法,则判断切片中是否有元素,传多个方法只会取第一个.
No description provided by the author
AppendStuct 将give的结构体中,同名的成员赋值给reciv.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
如果是字符串,则转化为int64, 浮点数丢失精度,无法转化则为0.
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
负责调用panic触发外部的panic处理函数.
压缩字符串,去除空格、制表符、换页符等字符.
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
获取 2 个切片的前后不同之处.
No description provided by the author
No description provided by the author
No description provided by the author
判断该值是否为表示空值,0,"0", false, "false"等.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ErrorResp 错误返回值.
这个函数会破坏file文件,所以不能瞎用.
过滤字符串数组中的空字符串.
返回切片中第一个满足指定方法的元素,如不存在则返回nil.
返回切片中第一个满足指定方法的元素,如不存在则返回入参中的默认值.
No description provided by the author
No description provided by the author
获取file对象.
No description provided by the author
No description provided by the author
直接获取json中的值.
获取自某个时刻最近几天的相同时刻(包含当日) base 起点时刻 days 最近的几天,< 0 表示过去几天;> 0 表示之后几天 desc[0] = true 倒序输出.
获取最近几天相同时刻.
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
获取该时间当天的起止时间点.
获取当前 时分秒 的秒数.
获取某一天的0点时间.
404处理.
服务异常处理.
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
判断interface是否为nil.
No description provided by the author
No description provided by the author
解析valjson对象.
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
将json字符串,复制给s结构体中同名json-tag的字段,s必须为结构体指针.
将json字符串,使用mapstruct实现.
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
将m的值,复制给s结构体中同名json-tag的字段,s必须为结构体指针.
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
默认使用 UUID4.
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
Range(n) return [0,1,...,n-1,n] with []int; Range(n,m) return [n,n+1,...,m-1,m] with []int.
Range64(n) return [0,1,...,n-1,n] with []int64; Range64(n,m) return [n,n+1,...,m-1,m] with []int64.
删除交集.
No description provided by the author
自动失败重试入参:t:重试次数sleepTime:失败后等待时间f:调用方法,interface{}为返回值,bool为是否成功callbacks:失败时的回调函数,i为调用次数出参:interface{}:调用方法的返回值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
字符串切片转换为 int64 切片.
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
"1,2,3,4" => []int{1, 2, 3, 4} "[1,2,3,4]" => []int{1, 2, 3, 4}.
"s1, s2, s3, s4" => []string{"s1", "s2", "s3", "s4"} "[s1, s2, s3, s4]" => []string{"s1", "s2", "s3", "s4"} "["s1", "s2", "s3", "s4"]" => []string{"s1", "s2", "s3", "s4"}.
必须dest传入指针.
No description provided by the author
You can get a substring of a UTF-8 string without allocating additional memory (you don't have to convert it to a rune slice) @from: https://stackoverflow.com/questions/28718682/how-to-get-a-substring-from-a-string-of-runes-in-golang.
模仿 php 中的 mb_strimwidth 字显示宽度为 1 或 2.
SuccessResp 正确返回值.
时间对象->时间戳*/.
*时间对象->字符串*/.
No description provided by the author
No description provided by the author
No description provided by the author
ToMap converts a struct to a map using the struct's tags.
No description provided by the author
将m的值,复制给s结构体中同名json-tag的字段,s必须为结构体指针 复合结构使用 mapstructure.ToStruct() 代替.
No description provided by the author
将下划线风格的单词变为驼峰命名的单词.
No description provided by the author
UUID3 generates a version 3 UUID.
UUID4 generates a version 4 UUID.
UUID5 generates a version 5 UUID.
No description provided by the author
No description provided by the author
获取本周所在年份、第几周,起止时间点.
返回切片中满足指定方法的元素.
简易的年月日转字符串 使用前需自行校验 year, month, day 有效性.

# 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
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

# 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
The following standard UUIDs are for use with UUID3() or UUID5().
The following standard UUIDs are for use with UUID3() or UUID5().
The following standard UUIDs are for use with UUID3() or UUID5().
The following standard UUIDs are for use with UUID3() or UUID5().
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

No description provided by the author
错误处理的结构体.
No description provided by the author
Resp 返回.
一个聚合的数据结构.
No description provided by the author

# Interfaces

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
No description provided by the author
UUID represents a UUID.
No description provided by the author