()
| 312 | } |
| 313 | |
| 314 | func ExampleEvent_EmbedObject() { |
| 315 | price := Price{val: 6449, prec: 2, unit: "$"} |
| 316 | |
| 317 | dst := bytes.Buffer{} |
| 318 | log := New(&dst) |
| 319 | |
| 320 | log.Log(). |
| 321 | Str("foo", "bar"). |
| 322 | EmbedObject(price). |
| 323 | Msg("hello world") |
| 324 | |
| 325 | fmt.Println(decodeIfBinaryToString(dst.Bytes())) |
| 326 | // Output: {"foo":"bar","price":"$64.49","message":"hello world"} |
| 327 | } |
| 328 | |
| 329 | func ExampleEvent_Interface() { |
| 330 | dst := bytes.Buffer{} |
nothing calls this directly
no test coverage detected