Update check templates to remove functions. Closes #1320

This commit is contained in:
Puskar Basu
2022-01-19 22:06:11 +05:30
committed by GitHub
parent b4cf62d3a0
commit be67b786f4
20 changed files with 323 additions and 256 deletions

14
utils/string_slice.go Normal file
View File

@@ -0,0 +1,14 @@
package utils
// TODO: investigate turbot/go-kit/helpers
func StringSliceDistinct(slice []string) []string {
var res []string
occurenceMap := make(map[string]struct{})
for _, item := range slice {
occurenceMap[item] = struct{}{}
}
for item := range occurenceMap {
res = append(res, item)
}
return res
}