return err if not EOF

This commit is contained in:
Antoine Toulme 2023-08-25 14:39:29 -07:00
parent ca71a6db3c
commit 4ed0f1436a
No known key found for this signature in database
GPG Key ID: 63199BF2E58EE4AE
1 changed files with 1 additions and 0 deletions

View File

@ -128,6 +128,7 @@ func ReadLine(filename string, prefix string) (string, error) {
if err == io.EOF { if err == io.EOF {
break break
} }
return "", err
} }
if strings.HasPrefix(line, prefix) { if strings.HasPrefix(line, prefix) {
return line, nil return line, nil