(e *encodeState, v reflect.Value, opts encOpts)
| 493 | } |
| 494 | |
| 495 | func addrTextMarshalerEncoder(e *encodeState, v reflect.Value, opts encOpts) { |
| 496 | va := v.Addr() |
| 497 | if va.IsNil() { |
| 498 | e.WriteString("null") |
| 499 | return |
| 500 | } |
| 501 | m := va.Interface().(encoding.TextMarshaler) |
| 502 | b, err := m.MarshalText() |
| 503 | if err != nil { |
| 504 | e.error(&MarshalerError{v.Type(), err}) |
| 505 | } |
| 506 | e.stringBytes(b, opts.escapeHTML) |
| 507 | } |
| 508 | |
| 509 | func boolEncoder(e *encodeState, v reflect.Value, opts encOpts) { |
| 510 | if opts.quoted { |
nothing calls this directly
no test coverage detected