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

Function toonValue

internal/cli/format.go:341–350  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

339}
340
341func toonValue(value string) string {
342 trimmed := strings.TrimSpace(value)
343 if trimmed == "" {
344 return `""`
345 }
346 if strings.ContainsAny(trimmed, ",\n\r\t\"") {
347 return strconv.Quote(trimmed)
348 }
349 return trimmed
350}
351
352func compactJSON(raw json.RawMessage) string {
353 if len(raw) == 0 {

Callers 1

writeToonValuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected