()
| 241 | } |
| 242 | |
| 243 | func ExampleEvent_Array() { |
| 244 | log := zerolog.New(os.Stdout) |
| 245 | |
| 246 | e := log.Log(). |
| 247 | Str("foo", "bar") |
| 248 | |
| 249 | e.Array("array", e.CreateArray(). |
| 250 | Str("baz"). |
| 251 | Int(1). |
| 252 | Dict(e.CreateDict(). |
| 253 | Str("bar", "baz"). |
| 254 | Int("n", 1), |
| 255 | ), |
| 256 | ). |
| 257 | Msg("hello world") |
| 258 | |
| 259 | // Output: {"foo":"bar","array":["baz",1,{"bar":"baz","n":1}],"message":"hello world"} |
| 260 | } |
| 261 | |
| 262 | func ExampleEvent_Array_object() { |
| 263 | log := zerolog.New(os.Stdout) |
nothing calls this directly
no test coverage detected
searching dependent graphs…