# README
go-functools
Go 写 CRUD 的一些工具函数
# Functions
AndSlice 对两个 Slice 取交集,时间复杂度为O(max(N, M)),N为a的长度,M为b的长度.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
深拷贝,string slice 也会拷贝一份新的.
DecryptDES DES 解密.
EncryptDES DES 加密.
No description provided by the author
Find 使用 == 作为谓词 的 FindIf.
FindIf 在 data 里找key,找到返回(下标, true),没找到返回(0, false).
No description provided by the author
No description provided by the author
GenGetFieldFunc D 数据类型 R 返回值类型 只支持 struct 和 map,不支持嵌套.
No description provided by the author
Identity 接到什么返什么.
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
OrSlice 对两个 Slice 取并集,时间复杂度为O(N+M),N为a的长度,M为b的长度.
ParseFormReq 从 req 中提取.
PhoneMasking 电话脱敏,前后保留两位,其他全部省略.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
StringToInt 有 error 直接 panic.
StructToMap 将结构体转为 map.
No description provided by the author
SubSlice 两个 Slice 求差.
TmpPtr 字面值变指针.
Unique Slice 去重,O(N) 的复杂度.
UniqueWithEqFun 对 slice 去重,O(N^2) 的复杂度,数据长度 > 1000 时慎用.
No description provided by the author
No description provided by the author
# Variables
No description provided by the author