提交 20285ead 作者: Matt Bell 提交者: Juan Batiz-Benet

commands: Indent JSON-marshalled Response output

上级 c8345bb5
......@@ -43,9 +43,9 @@ const (
var marshallers = map[EncodingType]Marshaller{
JSON: func(res Response) ([]byte, error) {
if res.Error() != nil {
return json.Marshal(res.Error())
return json.MarshalIndent(res.Error(), "", " ")
}
return json.Marshal(res.Output())
return json.MarshalIndent(res.Output(), "", " ")
},
XML: func(res Response) ([]byte, error) {
if res.Error() != nil {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论