From 58f928c39cad69394dc69f2b8fddff831ae0a809 Mon Sep 17 00:00:00 2001 From: Leonardo Risch Date: Tue, 7 Oct 2025 13:55:22 -0300 Subject: [PATCH] add: missing file --- internal/output/render.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 internal/output/render.go diff --git a/internal/output/render.go b/internal/output/render.go new file mode 100644 index 0000000..8465db1 --- /dev/null +++ b/internal/output/render.go @@ -0,0 +1,14 @@ +package output + +import ( + "encoding/json" +) + +// RenderAsJSON marshals and renders any data structure as pretty JSON +func RenderAsJSON(data interface{}) error { + jsonBytes, err := json.MarshalIndent(data, "", " ") + if err != nil { + return err + } + return RenderJSON(jsonBytes) +}