MapObjectEncoder is an ObjectEncoder backed by a simple map[string]interface{}. It's not fast enough for production use, but it's helpful in tests.
| 26 | // map[string]interface{}. It's not fast enough for production use, but it's |
| 27 | // helpful in tests. |
| 28 | type MapObjectEncoder struct { |
| 29 | // Fields contains the entire encoded log context. |
| 30 | Fields map[string]interface{} |
| 31 | // cur is a pointer to the namespace we're currently writing to. |
| 32 | cur map[string]interface{} |
| 33 | } |
| 34 | |
| 35 | // NewMapObjectEncoder creates a new map-backed ObjectEncoder. |
| 36 | func NewMapObjectEncoder() *MapObjectEncoder { |
nothing calls this directly
no outgoing calls
no test coverage detected