Don't output >20 items at once

This commit is contained in:
Daniel Mason 2021-09-06 10:22:21 +12:00
parent 80e020f1b4
commit 6eb7e26d4d
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -59,6 +59,11 @@ func parseCsvRow(data string) {
// Append row data // Append row data
updatedLocations.Locations = append(updatedLocations.Locations, newRow) updatedLocations.Locations = append(updatedLocations.Locations, newRow)
} }
if len(updatedLocations.Locations) > 20 {
log.Print("Not displaying >20 locations!")
updatedLocations = UpdatedLocations{}
}
} }
// rowHasChanged - Determine if row has actually changed based on raw data // rowHasChanged - Determine if row has actually changed based on raw data