summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-26 00:49:51 -0400
committerLuke Shumaker <lukeshu@beefcake.parabola.nu>2018-05-26 00:49:51 -0400
commit6ae34ffb59a05c0098273d8d18e2986a6e43cbf4 (patch)
treef903f13f8dc797d43c22ffb907c8aa3043705396
parentd6703afa3b00bc5b972ebc9e32871eedce629923 (diff)
gofmt
-rw-r--r--go/src/cow-dedupe/dedupe.go6
-rw-r--r--go/src/lib/pipeline/pipeline.go2
-rw-r--r--go/src/lib/statusline/prefix.go6
-rw-r--r--go/src/lib/statusline/statuslinue.go4
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, "")