Add log output config option (#172)

Co-authored-by: Thomas Miceli <27960254+thomiceli@users.noreply.github.com>
This commit is contained in:
Jacob Hands
2023-12-27 10:24:52 -06:00
committed by Thomas Miceli
parent 3c97901995
commit 4bba26daf6
4 changed files with 50 additions and 6 deletions

View File

@ -8,3 +8,15 @@ func SliceContains(slice []string, item string) bool {
}
return false
}
func RemoveDuplicates[T string | int](sliceList []T) []T {
allKeys := make(map[T]bool)
list := []T{}
for _, item := range sliceList {
if _, value := allKeys[item]; !value {
allKeys[item] = true
list = append(list, item)
}
}
return list
}