Skip to content

Commit 47358a5

Browse files
rizwanrezajoshzarrabi
authored andcommitted
Pretty print json output
[#152703695] Signed-off-by: Josh Zarrabi <[email protected]>
1 parent 69c68f5 commit 47358a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

presenters/json_presenter.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,6 @@ func (j JSONPresenter) PresentStagedProducts(stagedProducts []api.DiagnosticProd
7979
}
8080

8181
func (j JSONPresenter) encodeJSON(v interface{}) {
82-
encoder := json.NewEncoder(j.stdout)
83-
encoder.Encode(&v)
82+
b, _ := json.MarshalIndent(&v, "", " ")
83+
j.stdout.Write(b)
8484
}

0 commit comments

Comments
 (0)