()
| 241 | } |
| 242 | |
| 243 | func ExampleEvent_Array() { |
| 244 | dst := bytes.Buffer{} |
| 245 | log := New(&dst) |
| 246 | |
| 247 | e := log.Log(). |
| 248 | Str("foo", "bar") |
| 249 | |
| 250 | e.Array("array", e.CreateArray(). |
| 251 | Str("baz"). |
| 252 | Int(1), |
| 253 | ). |
| 254 | Msg("hello world") |
| 255 | |
| 256 | fmt.Println(decodeIfBinaryToString(dst.Bytes())) |
| 257 | // Output: {"foo":"bar","array":["baz",1],"message":"hello world"} |
| 258 | } |
| 259 | |
| 260 | func ExampleEvent_Array_object() { |
| 261 | dst := bytes.Buffer{} |
nothing calls this directly
no test coverage detected