(t *testing.T)
| 94 | } |
| 95 | |
| 96 | func TestSlogHandler_WithStringAttr(t *testing.T) { |
| 97 | var buf bytes.Buffer |
| 98 | logger := newSlogLogger(&buf) |
| 99 | |
| 100 | logger.Info("test", "key", "value") |
| 101 | |
| 102 | m := decodeJSON(t, &buf) |
| 103 | if m["key"] != "value" { |
| 104 | t.Errorf("expected key=value, got %v", m["key"]) |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | func TestSlogHandler_WithIntAttr(t *testing.T) { |
| 109 | var buf bytes.Buffer |
nothing calls this directly
no test coverage detected