firstNonEmptyLine advances the scanner to the first non-empty line and returns the contents of that line.
(scanner *bufio.Scanner)
| 508 | // firstNonEmptyLine advances the scanner to the first non-empty line |
| 509 | // and returns the contents of that line. |
| 510 | func firstNonEmptyLine(scanner *bufio.Scanner) string { |
| 511 | for scanner.Scan() { |
| 512 | line := scanner.Text() |
| 513 | if strings.TrimSpace(line) != "" { |
| 514 | return line |
| 515 | } |
| 516 | } |
| 517 | return "" |
| 518 | } |
no outgoing calls
no test coverage detected