()
| 203 | } |
| 204 | |
| 205 | func ExampleEvent_Dict() { |
| 206 | dst := bytes.Buffer{} |
| 207 | log := New(&dst) |
| 208 | |
| 209 | e := log.Log(). |
| 210 | Str("foo", "bar") |
| 211 | |
| 212 | e.Dict("dict", e.CreateDict(). |
| 213 | Str("bar", "baz"). |
| 214 | Int("n", 1), |
| 215 | ). |
| 216 | Msg("hello world") |
| 217 | |
| 218 | fmt.Println(decodeIfBinaryToString(dst.Bytes())) |
| 219 | // Output: {"foo":"bar","dict":{"bar":"baz","n":1},"message":"hello world"} |
| 220 | } |
| 221 | |
| 222 | type User struct { |
| 223 | Name string |
nothing calls this directly
no test coverage detected
searching dependent graphs…