diff options
-rw-r--r-- | go/src/cow-dedupe/dedupe.go | 6 | ||||
-rw-r--r-- | go/src/lib/pipeline/pipeline.go | 2 | ||||
-rw-r--r-- | go/src/lib/statusline/prefix.go | 6 | ||||
-rw-r--r-- | go/src/lib/statusline/statuslinue.go | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/go/src/cow-dedupe/dedupe.go b/go/src/cow-dedupe/dedupe.go index e04257d..dc37491 100644 --- a/go/src/cow-dedupe/dedupe.go +++ b/go/src/cow-dedupe/dedupe.go @@ -73,7 +73,7 @@ func getFiemaps(paths []string) map[string][]string { cnt++ sl.Put(fmt.Sprintf("Mapping extents... %d", cnt)) } - /*errhandle(*/cmd.Wait()/*)*/ + /*errhandle(*/ cmd.Wait() /*)*/ sl.Put(fmt.Sprintf("Mapping extents... done; mapped %d files", cnt)) sl.End(true) @@ -122,7 +122,7 @@ func getChecksums(sl statusline.StatusLine, slfmt string, basecmd []string, path cnt++ sl.Put(fmt.Sprintf(slfmt, cnt, len(paths))) } - /*errhandle(*/cmd.Wait()/*)*/ + /*errhandle(*/ cmd.Wait() /*)*/ } sl.Put(fmt.Sprintf(slfmt, "done", cnt)) @@ -256,7 +256,7 @@ func main() { // And actually dedupe those name := filepath.Base(srcFile) if len(name) > 21 { - name = name[:20]+"…" + name = name[:20] + "…" } status.verb = fmt.Sprintf("dedupe %q (and %d more)", name, len(dupFiles)) sl.Put(status.String()) diff --git a/go/src/lib/pipeline/pipeline.go b/go/src/lib/pipeline/pipeline.go index a74e626..56a32ef 100644 --- a/go/src/lib/pipeline/pipeline.go +++ b/go/src/lib/pipeline/pipeline.go @@ -1,8 +1,8 @@ package pipeline import ( - "os/exec" "io" + "os/exec" ) type Pipe struct { diff --git a/go/src/lib/statusline/prefix.go b/go/src/lib/statusline/prefix.go index 9373410..7ec1abe 100644 --- a/go/src/lib/statusline/prefix.go +++ b/go/src/lib/statusline/prefix.go @@ -1,19 +1,19 @@ package statusline type prefix struct { - inner StatusLine + inner StatusLine prefix string } func Prefix(sl StatusLine, pfix string) StatusLine { return &prefix{ - inner: sl, + inner: sl, prefix: pfix, } } func (sl *prefix) Put(line string) { - sl.inner.Put(sl.prefix+line) + sl.inner.Put(sl.prefix + line) } func (sl *prefix) End(keep bool) { diff --git a/go/src/lib/statusline/statuslinue.go b/go/src/lib/statusline/statuslinue.go index 323c178..bedf952 100644 --- a/go/src/lib/statusline/statuslinue.go +++ b/go/src/lib/statusline/statuslinue.go @@ -11,7 +11,7 @@ type StatusLine interface { } type statusLine struct { - out io.Writer + out io.Writer prevLen int } @@ -25,7 +25,7 @@ func (sl *statusLine) Put(line string) { } func (sl *statusLine) End(keep bool) { - if (keep) { + if keep { io.WriteString(sl.out, "\n") } else { fmt.Fprintf(sl.out, "\r%-[1]*[2]s\r", sl.prevLen, "") |