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

Function DictObject

field.go:440–442  ·  view source on GitHub ↗

DictObject constructs a [zapcore.ObjectMarshaler] with the given list of fields. The resulting object marshaler can be used as input to [Object], [Objects], or any other functions that expect an object marshaler.

(val ...Field)

Source from the content-addressed store, hash-verified

438// The resulting object marshaler can be used as input to [Object], [Objects], or
439// any other functions that expect an object marshaler.
440func DictObject(val ...Field) zapcore.ObjectMarshaler {
441 return dictObject(val)
442}
443
444// We discovered an issue where zap.Any can cause a performance degradation
445// when used in new goroutines.

Callers 3

ExampleDictObjectFunction · 0.92
TestEqualsFunction · 0.92
TestDictObjectFunction · 0.85

Calls 1

dictObjectTypeAlias · 0.85

Tested by 3

ExampleDictObjectFunction · 0.74
TestEqualsFunction · 0.74
TestDictObjectFunction · 0.68