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

Function ByteString

field.go:83–85  ·  view source on GitHub ↗

ByteString constructs a field that carries UTF-8 encoded text as a []byte. To log opaque binary blobs (which aren't necessarily valid UTF-8), use Binary.

(key string, val []byte)

Source from the content-addressed store, hash-verified

81// To log opaque binary blobs (which aren't necessarily valid UTF-8), use
82// Binary.
83func ByteString(key string, val []byte) Field {
84 return Field{Key: key, Type: zapcore.ByteStringType, Interface: val}
85}
86
87// Complex128 constructs a field that carries a complex number. Unlike most
88// numeric fields, this costs an allocation (to convert the complex128 to

Callers 3

TestEqualsFunction · 0.92
TestFieldConstructorsFunction · 0.85
BenchmarkByteStringFieldFunction · 0.85

Calls

no outgoing calls

Tested by 3

TestEqualsFunction · 0.74
TestFieldConstructorsFunction · 0.68
BenchmarkByteStringFieldFunction · 0.68