diff options
author | Nick White <git@njw.name> | 2021-07-23 16:17:40 +0100 |
---|---|---|
committer | Nick White <git@njw.name> | 2021-07-23 16:17:40 +0100 |
commit | b571f780dcc4baafa659bebbc316204a46e42f4f (patch) | |
tree | b892958a63fd95b63b5f0e3591fabb53a272a537 /cmd/analysestats | |
parent | 80a68210b4332e2d83e6b3e48a9ac94218d59f8b (diff) |
gofmt
Diffstat (limited to 'cmd/analysestats')
-rw-r--r-- | cmd/analysestats/main.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/analysestats/main.go b/cmd/analysestats/main.go index 10be46a..aeb51ca 100644 --- a/cmd/analysestats/main.go +++ b/cmd/analysestats/main.go @@ -18,8 +18,8 @@ import ( "math" "os" "path/filepath" - "strings" "strconv" + "strings" ) const usage = `Usage: analysestats statsdir csvfile @@ -127,7 +127,7 @@ func getMeanStddevOfBest(bestfn string, conffn string) (float64, float64, error) for _, v := range bestConfs { a += (float64(v) - mean) * (float64(v) - mean) } - variance := a / float64(len(bestConfs) - 1) + variance := a / float64(len(bestConfs)-1) stddev = math.Sqrt(variance) } @@ -153,7 +153,7 @@ func walker(bookstats *Bookstats) filepath.WalkFunc { if len(parts) < 2 || len(b) < 6 { return nil } - prefix := b[0:len(b)-6] // 6 is length of '-hocr' + 1 + prefix := b[0 : len(b)-6] // 6 is length of '-hocr' + 1 ext := parts[len(parts)-1] if ext != "hocr" && ext != "best" { |