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 5a75b3e7cd
commit 03f089c9c3
7 changed files with 278 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
package output
import (
"io"
"gopkg.in/yaml.v3"
)
func printYAML(w io.Writer, data any) error {
enc := yaml.NewEncoder(w)
enc.SetIndent(2)
return enc.Encode(data)
}