fj/cmd/json.go
2026-01-18 13:11:41 +01:00

12 lines
170 B
Go

package cmd
import (
"encoding/json"
"os"
)
func writeJSON(value any) error {
enc := json.NewEncoder(os.Stdout)
enc.SetIndent("", " ")
return enc.Encode(value)
}