summaryrefslogtreecommitdiff
path: root/line-conf-buckets/line-conf-buckets.go
diff options
context:
space:
mode:
Diffstat (limited to 'line-conf-buckets/line-conf-buckets.go')
-rw-r--r--line-conf-buckets/line-conf-buckets.go17
1 files changed, 1 insertions, 16 deletions
diff --git a/line-conf-buckets/line-conf-buckets.go b/line-conf-buckets/line-conf-buckets.go
index 915b2b4..689b779 100644
--- a/line-conf-buckets/line-conf-buckets.go
+++ b/line-conf-buckets/line-conf-buckets.go
@@ -4,7 +4,6 @@ package main
// TODO: set bucket dirname from cmdline
import (
- "bufio"
"flag"
"fmt"
"log"
@@ -14,20 +13,6 @@ import (
"git.rescribe.xyz/testingtools/parse/prob"
)
-func detailsFromFile(f string) (parse.LineDetails, error) {
- var newlines parse.LineDetails
-
- file, err := os.Open(f)
- if err != nil {
- return newlines, err
- }
- defer file.Close()
-
- reader := bufio.NewReader(file)
-
- return prob.GetLineDetails(f, reader)
-}
-
func main() {
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: line-conf-buckets prob1 [prob2] [...]\n")
@@ -44,7 +29,7 @@ func main() {
lines := make(parse.LineDetails, 0)
for _, f := range flag.Args() {
- newlines, err := detailsFromFile(f)
+ newlines, err := prob.GetLineDetails(f)
if err != nil {
log.Fatal(err)
}