feat: output system — table/json/yaml/raw printers with struct tag driven tables
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user