Documentation
¶
Index ¶
- func ClickhouseDsnConvert(req string) (res string)
- func DeepCopy(dst, src interface{}) error
- func Diff(a map[string]interface{}, b map[string]interface{}) map[string]interface{}
- func DiffList(source, dest interface{}, cmp func(a, b interface{}) bool) (res []interface{})
- func DiffListToSlice(source, dest interface{}, cmp func(a, b interface{}) bool) (res interface{})
- func FindIndex(arr interface{}, item interface{}, cmp func(a, b interface{}) bool) (index int)
- func GenerateFieldOrderRules(sql string) ([]string, bool)
- func GetFilterK8SContainerdWrapLog(s string) string
- func Index(s, substr string) (string, int)
- func IndexParse(line string) (string, int)
- func IsSliceEqual(a, b interface{}) bool
- func MD5Encode32(str string) string
- func ParseAppUrlAndSubUrl(appUrl string) (string, string, error)
- func PathExist(path string) (bool, error)
- func PhoneSensitiveInfoRemove(phone string) string
- func RandomString(length int) string
- func StringSliceWithoutRepeat(source []string, notContainEmpty bool) []string
- func SundaySearch(s, p string, keys map[uint8]int) int
- func TimeParse(value string) time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClickhouseDsnConvert ¶
ClickhouseDsnConvert convert clickhouse-go v1.5 to v2.0
func DiffList ¶
func DiffList(source, dest interface{}, cmp func(a, b interface{}) bool) (res []interface{})
DiffList 求 source 和 dest 的 交/差集 此函数效率较低(O(n^2)),请在列表长度较小时使用
func DiffListToSlice ¶
func DiffListToSlice(source, dest interface{}, cmp func(a, b interface{}) bool) (res interface{})
DiffListToSlice 求 source 和 dest 的 交/差集,返回类型和 source 相同
func GenerateFieldOrderRules ¶
func GetFilterK8SContainerdWrapLog ¶
getFilterK8SContainerdWrapLog 过滤k8s containerd 包起来日志 containerd 日志有一些数据前缀,导致不是json,需要过滤一些数据 2023-10-12T16:27:56.359684537+08:00 stderr F {"lv":"info","ts":1697099276,"caller":"egorm@v1.0.6/interceptor.go:125","msg":"access","lname":"ego.sys","comp":"component.egorm","compName":"mysql.file","addr":"mysql-master:3306","method":"gorm:row","name":"svc_file.","cost":0.223,"tid":"","event":"normal"}
func IndexParse ¶
func IsSliceEqual ¶
func IsSliceEqual(a, b interface{}) bool
func MD5Encode32 ¶
func PhoneSensitiveInfoRemove ¶
PhoneSensitiveInfoRemove ...
func RandomString ¶
func StringSliceWithoutRepeat ¶
StringSliceWithoutRepeat 去除[]string 中的重复元素 source 源切片 notContainEmpty 是否不包含空字符串
Types ¶
This section is empty.