summaryrefslogtreecommitdiff
path: root/line-conf-buckets
diff options
context:
space:
mode:
authorNick White <git@njw.name>2019-01-24 17:02:56 +0000
committerNick White <git@njw.name>2019-01-24 17:02:56 +0000
commit20a479c5a9dbdb24e3fe08aeb94440ade6a88de9 (patch)
tree653253ee8f20b3c566e97d063933a52fa141fa46 /line-conf-buckets
parent55a93a583ad41693166d176abd908d0aa2e85784 (diff)
Simplify .prob processing
Diffstat (limited to 'line-conf-buckets')
-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)
}