Use map instead of list as set
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user