Categorygithub.com/FredyXue/go-utils
modulepackage
0.0.0-20231008115827-dd000e3cdd44
Repository: https://github.com/fredyxue/go-utils.git
Documentation: pkg.go.dev

# README

go-utils

go-utils

# Packages

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

# Functions

No description provided by the author
CreateRandDigest create random digest string.
Fibonacci start n = 0.
GetLongestSubSequence 获取最大公共子序列 二维动态规划 dp[i][j] 表示 arr1 第 i 个元素和 arr2 第 j 个元素为最后一个元素所构成的最长公共子序列, 时间复杂度 O(n²)、空间复杂度 O(n²).
GetUniqueArraySubSequences 获取两个unique的数组之间的 所有同序子组 (length >= 2) 时间复杂度 O(n^2) 问题:无法匹配出有重合部分的子组 e.g.
HiddenName 名称脱敏 张三 张* 李二四 李*四.
HiddenPhoneNumber 手机号 脱敏 86-13912341234 86-139****1234 65-96123412 65-96****12 852-94123412 852-94****12 64-02112341234 64-021****1234 1-9291234123 1-929****123.
IncrTimeWithClock 获取增量精确时间 clock (0, 86400] 目标时间点 目标时间小于 clock, 顺延一天.
IncrTimeWithClockUTC8 获取增量精确时间 东八区.
MD5 generate md5 digest.
MD5WithString generate md5 digest with string.
MergeError 合并 error.
MustTimeFormat TimeFormat with panic.
NewSet .
NewSet create set with arrs init also can use 'make(Set)'.
Protect panic protect.
Protect panic protect return panic error.
RandString 生成指定位数的随机字符串 template 自定字符串合集.
SearchArray .
SliceValueToInterface []T -> []interface{}.
TimeFormat 格式化时间 opts[0] format yyyyMMddHHmmss 默认 yyyy-MM-dd HH:mm:ss opts[1] timezone 时区 不传表示 local 支持的格式 e.g.
TimeFormatWithLayout 使用 time layout 格式化 时间 offset 时区秒偏移 不传表示 local e.g.

# Variables

Rand custom rand.

# Structs

SafeSet 使用 RWMutex 实现的 并发安全的 Set.

# Type aliases

Set struct set.