mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-03 13:00:37 +08:00
commands: Indent JSON-marshalled Response output
This commit is contained in:

committed by
Juan Batiz-Benet

parent
c8345bb5c6
commit
20285ead82
@ -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 {
|
||||
|
Reference in New Issue
Block a user