package
0.0.0-20241217062345-852b9c5a8d98
Repository: https://github.com/tianlin0/plat-lib.git
Documentation: pkg.go.dev
# Functions
*
1、目前不能解决继承为小写的情况
2、已有值了,填充没有的情况
*/.
Bool convert to bool.
ChangeVariableName 将驼峰与小写互转.
DelKey 批量删除map里多个字段.
FillMap 将oldMap中的数据填充到mapStruct中.
FilterMap map有很多字段,需要通过Mapstruct过滤,主要用在查询数据库时, 因为前端传的参数可能很多,需要过滤出数据库包含的字段才可以用.
Float64 convert any to float64.
FormatFromUnixTime 将unix时间戳格式化为YYYYMMDD HH:MM:SS格式字符串 FormatFromUnixTime(FullDate, 12321312).
GetJsonKeyMaps 取得一个struct的所有key,批量输出到前端使用.
GetTimeLocation 获得时区.
HideColumn 与上相反.
HttpBuildQuery 将map转换为a=1&b=2.
Int64 转换为int64,最大:9223372036854775807.
IPToUInt32 ip转数字.
MapSort 按key排序 isDesc 是否降序.
No description provided by the author
SetTimeLocation 设置时区.
ShowColumn 将一个数组中很多字段,过滤出showList里包含的字段,返回map或数组.
String 转换为string.
Time 转换为Time.
ToKeyListFromMap 参数传字符串,避免不是map结构 {"app":{"mm":1}} ==> "app.mm" : 1.
ToMapFromKeyList "app.mm" : 1 ==> {"app":{"mm":1}}.
UInt32ToIP 将uint32类型转化为ipv4地址.
Unmarshal 将前一个的对象填充到后一个对象中,字段名相同的覆盖值, 返回 interface 的作用是如果toPoint为nil的时候,也能正常返回对象.
# 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
# Variables
No description provided by the author