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

Method UnmarshalText

zapcore/encoder.go:319–327  ·  view source on GitHub ↗

UnmarshalText unmarshals text to a NameEncoder. Currently, everything is unmarshaled to FullNameEncoder.

(text []byte)

Source from the content-addressed store, hash-verified

317// UnmarshalText unmarshals text to a NameEncoder. Currently, everything is
318// unmarshaled to FullNameEncoder.
319func (e *NameEncoder) UnmarshalText(text []byte) error {
320 switch string(text) {
321 case "full":
322 *e = FullNameEncoder
323 default:
324 *e = FullNameEncoder
325 }
326 return nil
327}
328
329// An EncoderConfig allows users to configure the concrete encoders supplied by
330// zapcore.

Callers 1

TestNameEncodersFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestNameEncodersFunction · 0.76