MCPcopy Create free account
hub / github.com/cli/cli / compactJSON

Function compactJSON

script/ghmock/report.go:546–552  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

544}
545
546func compactJSON(data []byte) string {
547 var buf bytes.Buffer
548 if err := json.Compact(&buf, data); err != nil {
549 return string(data)
550 }
551 return buf.String()
552}
553
554func truncate(s string, n int) string {
555 if len(s) <= n {

Callers 5

queriesForFunction · 0.70
TestRequestNameFunction · 0.70
printLogFunction · 0.70
formatRequestFunction · 0.70
requestPayloadsFunction · 0.70

Calls 1

StringMethod · 0.65

Tested by 1

TestRequestNameFunction · 0.56