MCPcopy Index your code
hub / github.com/coder/slog / indentJSON

Function indentJSON

map_test.go:246–252  ·  view source on GitHub ↗
(t *testing.T, j string)

Source from the content-addressed store, hash-verified

244}
245
246func indentJSON(t *testing.T, j string) string {
247 b := &bytes.Buffer{}
248 err := json.Indent(b, []byte(j), "", strings.Repeat(" ", 4))
249 assert.Success(t, "indent JSON", err)
250
251 return b.String()
252}
253
254func marshalJSON(t *testing.T, m slog.Map) string {
255 actb, err := json.Marshal(m)

Callers 2

TestMapFunction · 0.85
marshalJSONFunction · 0.85

Calls 2

SuccessFunction · 0.92
StringMethod · 0.80

Tested by

no test coverage detected