config_file.go: skip newlines
This commit is contained in:
parent
ccfdba4f54
commit
6f06c4ed65
@ -17,6 +17,9 @@ func configFileLoad(filepath string) error {
|
|||||||
scanner := bufio.NewScanner(file)
|
scanner := bufio.NewScanner(file)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := strings.TrimSpace(scanner.Text())
|
line := strings.TrimSpace(scanner.Text())
|
||||||
|
if line == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
i := strings.Index(line, "=")
|
i := strings.Index(line, "=")
|
||||||
if i == -1 {
|
if i == -1 {
|
||||||
|
Loading…
Reference in New Issue
Block a user