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

Function Stringer

field.go:341–343  ·  view source on GitHub ↗

Stringer constructs a field with the given key and the output of the value's String method. The Stringer's String method is called lazily.

(key string, val fmt.Stringer)

Source from the content-addressed store, hash-verified

339// Stringer constructs a field with the given key and the output of the value's
340// String method. The Stringer's String method is called lazily.
341func Stringer(key string, val fmt.Stringer) Field {
342 return Field{Key: key, Type: zapcore.StringerType, Interface: val}
343}
344
345// Time constructs a Field with the given key and value. The encoder
346// controls how the time is serialized.

Callers 3

TestFieldConstructorsFunction · 0.85
BenchmarkStringerFieldFunction · 0.85
BenchmarkAnyFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestFieldConstructorsFunction · 0.68
BenchmarkStringerFieldFunction · 0.68
BenchmarkAnyFunction · 0.68