commit | 6a2159139a4203627b3a3a2c463c0b9325f04d39 | [log] [tgz] |
---|---|---|
author | Pearl Dsilva <pearl1594@gmail.com> | Tue Aug 03 12:37:02 2021 +0530 |
committer | GitHub <noreply@github.com> | Tue Aug 03 12:37:02 2021 +0530 |
tree | ebfc7566faa757165b44b669fa4f1ca6aeb6d82f | |
parent | 77d334e0400df9a7cf4333a78443f2adf6abd195 [diff] |
Print map in readable format when display format is set to text (#86)
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 @@ 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) }