This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
The following commit(s) were added to refs/heads/main by this push:
new 6a21591 Print map in readable format when display format is set to
text (#86)
6a21591 is described below
commit 6a2159139a4203627b3a3a2c463c0b9325f04d39
Author: Pearl Dsilva <[email protected]>
AuthorDate: Tue Aug 3 12:37:02 2021 +0530
Print map in readable format when display format is set to text (#86)
---
cmd/output.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmd/output.go b/cmd/output.go
index e3815e4..d18458d 100644
--- a/cmd/output.go
+++ b/cmd/output.go
@@ -35,7 +35,7 @@ func jsonify(value interface{}) string {
return ""
}
if reflect.TypeOf(value).Kind() == reflect.Map ||
reflect.TypeOf(value).Kind() == reflect.Slice {
- jsonStr, err := json.Marshal(value)
+ jsonStr, err := json.MarshalIndent(value, "", "")
if err == nil {
value = string(jsonStr)
}