Skip to content

Commit

Permalink
fix: JSON indented for easier view
Browse files Browse the repository at this point in the history
  • Loading branch information
karl-cardenas-coding committed Jul 7, 2020
1 parent 3ad01a8 commit 5be711d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/categories.go
Expand Up @@ -58,7 +58,7 @@ The returned category may be used with the --filter flag for the event cmd.`,
}

if outputFlag == "json" {
json, err := json.Marshal(records)
json, err := json.MarshalIndent(records, "", "")
if err != nil {
log.WithFields(log.Fields{
"package": "cmd",
Expand Down
4 changes: 2 additions & 2 deletions cmd/events.go
Expand Up @@ -74,7 +74,7 @@ func outputJSON(records library.EventResponse, filters []string) {

}

json, err := json.Marshal(&list)
json, err := json.MarshalIndent(&list, "", "")
if err != nil {
log.WithFields(log.Fields{
"package": "cmd",
Expand All @@ -91,7 +91,7 @@ func outputJSON(records library.EventResponse, filters []string) {

if len(filters) == 0 {

json, err := json.Marshal(&records)
json, err := json.MarshalIndent(&records, "", "")
if err != nil {
log.WithFields(log.Fields{
"package": "cmd",
Expand Down

0 comments on commit 5be711d

Please sign in to comment.