MCPcopy Create free account
hub / github.com/labstack/gommon / TestJSON

Function TestJSON

log/log_test.go:104–111  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

102}
103
104func TestJSON(t *testing.T) {
105 l := New("test")
106 b := new(bytes.Buffer)
107 l.SetOutput(b)
108 l.SetLevel(DEBUG)
109 l.Debugj(JSON{"name": "value"})
110 assert.Contains(t, b.String(), `"name":"value"`)
111}
112
113func TestStringWithQuotes(t *testing.T) {
114 l := New("test")

Callers

nothing calls this directly

Calls 5

SetLevelMethod · 0.80
DebugjMethod · 0.80
StringMethod · 0.80
NewFunction · 0.70
SetOutputMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…