MCPcopy
hub / github.com/rs/zerolog / decodeJSON

Function decodeJSON

slog_test.go:31–39  ·  view source on GitHub ↗
(t *testing.T, buf *bytes.Buffer)

Source from the content-addressed store, hash-verified

29}
30
31func decodeJSON(t *testing.T, buf *bytes.Buffer) map[string]interface{} {
32 t.Helper()
33 var m map[string]interface{}
34 s := decodeOutput(buf)
35 if err := json.Unmarshal([]byte(s), &m); err != nil {
36 t.Fatalf("failed to decode JSON %q: %v", s, err)
37 }
38 return m
39}
40
41func TestSlogHandler_BasicInfo(t *testing.T) {
42 var buf bytes.Buffer

Calls 2

decodeOutputFunction · 0.85
HelperMethod · 0.80

Tested by

no test coverage detected