(p Elem, ctx Context)
| 33 | } |
| 34 | |
| 35 | func (d *decodeGen) Execute(p Elem, ctx Context) error { |
| 36 | d.ctx = &ctx |
| 37 | p = d.applyall(p) |
| 38 | if p == nil { |
| 39 | return nil |
| 40 | } |
| 41 | d.hasfield = false |
| 42 | if !d.p.ok() { |
| 43 | return d.p.err |
| 44 | } |
| 45 | |
| 46 | if !IsPrintable(p) { |
| 47 | return nil |
| 48 | } |
| 49 | |
| 50 | d.p.comment("DecodeMsg implements msgp.Decodable") |
| 51 | |
| 52 | d.p.printf("\nfunc (%s %s) DecodeMsg(dc *msgp.Reader) (err error) {", p.Varname(), methodReceiver(p)) |
| 53 | next(d, p) |
| 54 | d.p.nakedReturn() |
| 55 | unsetReceiver(p) |
| 56 | return d.p.err |
| 57 | } |
| 58 | |
| 59 | func (d *decodeGen) gStruct(s *Struct) { |
| 60 | if !d.p.ok() { |
nothing calls this directly
no test coverage detected