Swap check for slightly better performance

This commit is contained in:
Ruakij 2022-11-15 22:48:10 +01:00
parent 9d31008d29
commit d0840e6171

View File

@ -55,7 +55,7 @@ func readFromFile(filePath string) (mapByName map[string]int, mapById map[int]st
// Go through file line-by-line // Go through file line-by-line
for scanner.Scan() { for scanner.Scan() {
text := scanner.Text() text := scanner.Text()
if(strings.HasPrefix(text, "#") || text == ""){ if(text == "" || strings.HasPrefix(text, "#")){
continue continue
} }