(out *bytes.Buffer)
| 20 | ) |
| 21 | |
| 22 | func decodeIfBinary(out *bytes.Buffer) string { |
| 23 | p := out.Bytes() |
| 24 | if len(p) == 0 || p[0] < 0x7F { |
| 25 | return out.String() |
| 26 | } |
| 27 | return cbor.DecodeObjectToStr(p) + "\n" |
| 28 | } |
| 29 | |
| 30 | func TestNewHandler(t *testing.T) { |
| 31 | log := zerolog.New(nil).With(). |
no test coverage detected