Merge branch 'upstream/main'

This commit is contained in:
Laisky.Cai
2025-02-16 13:18:50 +00:00
40 changed files with 1185 additions and 340 deletions

13
common/utils/array.go Normal file
View File

@@ -0,0 +1,13 @@
package utils
func DeDuplication(slice []string) []string {
m := make(map[string]bool)
for _, v := range slice {
m[v] = true
}
result := make([]string, 0, len(m))
for v := range m {
result = append(result, v)
}
return result
}