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

Function Binary

field.go:58–60  ·  view source on GitHub ↗

Binary constructs a field that carries an opaque binary blob. Binary data is serialized in an encoding-appropriate format. For example, zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text, use ByteString.

(key string, val []byte)

Source from the content-addressed store, hash-verified

56// zap's JSON encoder base64-encodes binary blobs. To log UTF-8 encoded text,
57// use ByteString.
58func Binary(key string, val []byte) Field {
59 return Field{Key: key, Type: zapcore.BinaryType, Interface: val}
60}
61
62// Bool constructs a field that carries a bool.
63func Bool(key string, val bool) Field {

Callers 2

TestEqualsFunction · 0.92
TestFieldConstructorsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestEqualsFunction · 0.74
TestFieldConstructorsFunction · 0.68