Files
rainyun_api_go_sdk/cmd/ry/internal/output/json.go
T

13 lines
176 B
Go

package output
import (
"encoding/json"
"io"
)
func printJSON(w io.Writer, data any) error {
enc := json.NewEncoder(w)
enc.SetIndent("", " ")
return enc.Encode(data)
}