Skip empty lines in the CSV file
This commit is contained in:
parent
a361aa52f3
commit
13e30ade2b
|
@ -131,6 +131,9 @@ func (source *Source) Parse() ([]RegisteredServer, error) {
|
||||||
return registeredServers, nil
|
return registeredServers, nil
|
||||||
}
|
}
|
||||||
for line, record := range records {
|
for line, record := range records {
|
||||||
|
if len(record) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if len(record) < 14 {
|
if len(record) < 14 {
|
||||||
return registeredServers, fmt.Errorf("Parse error at line %d", line)
|
return registeredServers, fmt.Errorf("Parse error at line %d", line)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue