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

Function String

field.go:222–224  ·  field.go::String

String constructs a field with the given key and value.

(key string, val string)

Source from the content-addressed store, hash-verified

220
221// String constructs a field with the given key and value.
222func String(key string, val string) Field {
223 return Field{Key: key, Type: zapcore.StringType, String: val}
224}
225
226// Stringp constructs a field that carries a *string. The returned Field will safely
227// and explicitly represent `nil` when appropriate.

Callers 15

Example_presetsFunction · 0.92
ExampleLogger_CheckFunction · 0.92
ExampleDictFunction · 0.92
ExampleDictObjectFunction · 0.92
TestJSONEncodeEntryFunction · 0.92
TestEqualsFunction · 0.92
TestIncreaseLevelFunction · 0.92
convertAttrToFieldFunction · 0.92
StrFunction · 0.92

Calls

no outgoing calls

Tested by 15

Example_presetsFunction · 0.74
ExampleLogger_CheckFunction · 0.74
ExampleDictFunction · 0.74
ExampleDictObjectFunction · 0.74
TestJSONEncodeEntryFunction · 0.74
TestEqualsFunction · 0.74
TestIncreaseLevelFunction · 0.74
TestFiltersFunction · 0.74
fakeFieldsFunction · 0.74