cmds: fix block output.
Juan Batiz-Benet committed
Nov 15, 2014 at 06:42 UTC
8a284c9848b9750296a348206966bd645f2d3998
1 file changed
+1
-3
core/commands2/block.go
+1
-3
@@ -2,7 +2,6 @@ package commands
2
3
import (
4
"bytes"
5
- "fmt"
5
"io"
6
"io/ioutil"
7
"time"
@@ -125,8 +124,7 @@ It reads from stdin, and <key> is a base58 encoded multihash.
124
Marshalers: cmds.MarshalerMap{
125
cmds.Text: func(res cmds.Response) ([]byte, error) {
126
block := res.Output().(*Block)
128
- s := fmt.Sprintf("Block added (%v bytes): %s\n", block.Length, block.Key)
129
- return []byte(s), nil
127
+ return []byte(block.Key + "\n"), nil
128
},
129
},
130
}