1
0

Use map instead of list as set

This commit is contained in:
Michal Horejsek
2020-10-12 10:13:58 +02:00
parent ef85c8df24
commit e0292fe957
6 changed files with 41 additions and 39 deletions

View File

@ -160,13 +160,5 @@ func sanitizeFileName(fileName string) string {
}
return r
}, fileName)
func appendIfNew(list []string, newItem string) []string {
for _, item := range list {
if item == newItem {
return list
}
}
return append(list, newItem)
}