1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-26 00:02:34 +01:00

Skip empty lines in the CSV file

This commit is contained in:
Frank Denis 2018-01-13 23:53:33 +01:00
parent a361aa52f3
commit 13e30ade2b

View File

@ -131,6 +131,9 @@ func (source *Source) Parse() ([]RegisteredServer, error) {
return registeredServers, nil
}
for line, record := range records {
if len(record) == 0 {
continue
}
if len(record) < 14 {
return registeredServers, fmt.Errorf("Parse error at line %d", line)
}