From 20a479c5a9dbdb24e3fe08aeb94440ade6a88de9 Mon Sep 17 00:00:00 2001 From: Nick White Date: Thu, 24 Jan 2019 17:02:56 +0000 Subject: Simplify .prob processing --- line-conf-buckets/line-conf-buckets.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'line-conf-buckets') 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) } -- cgit v1.2.1-24-ge1ad