ignore empty lines
This commit is contained in:
parent
f93329f99f
commit
e55e33b417
|
|
@ -53,9 +53,11 @@ func IterateSegments(handle *os.File, before func(l string), cb func(seg *Segmen
|
||||||
scanner.Split(bufio.ScanLines)
|
scanner.Split(bufio.ScanLines)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
var l = strings.TrimSpace(strings.TrimSuffix(scanner.Text(), "\n"))
|
var l = strings.TrimSpace(strings.TrimSuffix(scanner.Text(), "\n"))
|
||||||
|
if len(l) < 1 { // ignore empty line
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// ignore the comment line
|
if l[0] == '#' { // ignore the comment line
|
||||||
if l[0] == '#' {
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue