]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Change status output
authorMatt Joiner <anacrolix@gmail.com>
Sat, 21 Feb 2015 03:57:37 +0000 (14:57 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 21 Feb 2015 03:57:37 +0000 (14:57 +1100)
client.go

index 94cbca0d81f68b9699f1cc2fce10898be55e295e..c5ad0dd1399055a7de9c4125c1dbeeb8029097e4 100644 (file)
--- a/client.go
+++ b/client.go
@@ -235,8 +235,11 @@ func (cl *Client) WriteStatus(_w io.Writer) {
                } else {
                        fmt.Fprint(w, t.Name())
                }
+               fmt.Fprint(w, "\n")
                if t.haveInfo() {
-                       fmt.Fprintf(w, ": %f%% of %d bytes", 100*(1-float32(t.BytesLeft())/float32(t.Length())), t.Length())
+                       fmt.Fprintf(w, "%f%% of %d bytes", 100*(1-float32(t.BytesLeft())/float32(t.Length())), t.Length())
+               } else {
+                       w.WriteString("<missing metainfo>")
                }
                fmt.Fprint(w, "\n")
                fmt.Fprint(w, "Blocked reads:")