feat(cmd/ry): add output package with raw format fix

This commit is contained in:
2026-08-13 00:33:38 +08:00
parent 16ccc8d339
commit c0f04c01b4
5 changed files with 287 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)
}