UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder.
(text []byte)
| 293 | // UnmarshalText unmarshals text to a CallerEncoder. "full" is unmarshaled to |
| 294 | // FullCallerEncoder and anything else is unmarshaled to ShortCallerEncoder. |
| 295 | func (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. |
no outgoing calls