feat: output system — table/json/yaml/raw printers with struct tag driven tables

This commit is contained in:
2026-07-28 15:54:18 +08:00
parent d815ec1e9a
commit dd1c2ef3db
7 changed files with 278 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
package output
import (
"encoding/json"
"io"
)
func printJSON(w io.Writer, data any) error {
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
return enc.Encode(data)
}