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

Method UnmarshalText

zapcore/encoder.go:295–303  ·  view source on GitHub ↗

UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder.

(text []byte)

Source from the content-addressed store, hash-verified

293// UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to
294// FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder.
295func (e *CallerEncoder) UnmarshalText(text []byte) error {
296 switch string(text) {
297 case "full":
298 *e = FullCallerEncoder
299 default:
300 *e = ShortCallerEncoder
301 }
302 return nil
303}
304
305// A NameEncoder serializes a period-separated logger name to a primitive
306// type.

Callers 1

TestCallerEncodersFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestCallerEncodersFunction · 0.76