MCPcopy
hub / github.com/uber-go/zap / MapObjectEncoder

Struct MapObjectEncoder

zapcore/memory_encoder.go:28–33  ·  zapcore/memory_encoder.go::MapObjectEncoder

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.

Source from the content-addressed store, hash-verified

26// map[string]interface{}. It's not fast enough for production use, but it's
27// helpful in tests.
28type 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.
36func NewMapObjectEncoder() *MapObjectEncoder {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected