Dustin Pianalto 71aac148e0
Some checks failed
CI / build (push) Has been cancelled
remove mod/admin role command
2021-01-26 00:08:20 -09:00

22 lines
315 B
Go

package utils
func RemoveDuplicateStrings(s []string) []string {
keys := make(map[string]bool)
o := []string{}
for _, e := range s {
if _, v := keys[e]; !v {
keys[e] = true
o = append(o, e)
}
}
return o
}
func PluralizeString(s string, i int) string {
if i == 1 {
return s
}
return s + "s"
}