提交 8a284c98 作者: Juan Batiz-Benet

cmds: fix block output.

上级 e8c51cd4
......@@ -2,7 +2,6 @@ package commands
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"time"
......@@ -125,8 +124,7 @@ It reads from stdin, and <key> is a base58 encoded multihash.
Marshalers: cmds.MarshalerMap{
cmds.Text: func(res cmds.Response) ([]byte, error) {
block := res.Output().(*Block)
s := fmt.Sprintf("Block added (%v bytes): %s\n", block.Length, block.Key)
return []byte(s), nil
return []byte(block.Key + "\n"), nil
},
},
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论