refactor: log parser names (again :))

This commit is contained in:
Inanc Gumus
2019-08-06 03:32:24 +03:00
parent 69094da997
commit 9c57aad7d9
5 changed files with 47 additions and 61 deletions

View File

@@ -14,9 +14,11 @@ import (
"strings"
)
func textReader(r io.Reader) ([]result, error) {
in := bufio.NewScanner(r)
return parseText(in)
func textReader(r io.Reader) inputFunc {
return func() ([]result, error) {
in := bufio.NewScanner(r)
return parseText(in)
}
}
func parseText(in *bufio.Scanner) ([]result, error) {