MCPcopy Create free account
hub / github.com/compozy/agh / writeJSON

Function writeJSON

internal/cli/format.go:179–184  ·  view source on GitHub ↗
(cmd *cobra.Command, value any)

Source from the content-addressed store, hash-verified

177}
178
179func writeJSON(cmd *cobra.Command, value any) error {
180 encoder := json.NewEncoder(cmd.OutOrStdout())
181 encoder.SetEscapeHTML(false)
182 encoder.SetIndent("", " ")
183 return encoder.Encode(value)
184}
185
186func writeRawCommandOutput(cmd *cobra.Command, text string) error {
187 writer := cmd.OutOrStdout()

Callers 3

writeToolCommandErrorFunction · 0.70
writeCommandOutputFunction · 0.70
writeSupportBundleResultFunction · 0.70

Calls 1

EncodeMethod · 0.65

Tested by

no test coverage detected