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

Function Dict

field.go:419–421  ·  view source on GitHub ↗

Dict constructs a field containing the provided key-value pairs. It acts similar to [Object], but with the fields specified as arguments.

(key string, val ...Field)

Source from the content-addressed store, hash-verified

417// Dict constructs a field containing the provided key-value pairs.
418// It acts similar to [Object], but with the fields specified as arguments.
419func Dict(key string, val ...Field) Field {
420 return dictField(key, val)
421}
422
423// We need a function with the signature (string, T) for zap.Any.
424func dictField(key string, val []Field) Field {

Callers 4

ExampleDictFunction · 0.92
TestEqualsFunction · 0.92
TestFieldConstructorsFunction · 0.85
TestDictFunction · 0.85

Calls 1

dictFieldFunction · 0.85

Tested by 4

ExampleDictFunction · 0.74
TestEqualsFunction · 0.74
TestFieldConstructorsFunction · 0.68
TestDictFunction · 0.68