mirror of
https://github.com/turbot/steampipe.git
synced 2026-02-15 04:00:14 -05:00
15 lines
315 B
Go
15 lines
315 B
Go
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
|
|
}
|