(p Elem, ctx Context)
| 32 | } |
| 33 | |
| 34 | func (u *unmarshalGen) Execute(p Elem, ctx Context) error { |
| 35 | u.hasfield = false |
| 36 | u.ctx = &ctx |
| 37 | if !u.p.ok() { |
| 38 | return u.p.err |
| 39 | } |
| 40 | p = u.applyall(p) |
| 41 | if p == nil { |
| 42 | return nil |
| 43 | } |
| 44 | if !IsPrintable(p) { |
| 45 | return nil |
| 46 | } |
| 47 | |
| 48 | u.p.comment("UnmarshalMsg implements msgp.Unmarshaler") |
| 49 | |
| 50 | u.p.printf("\nfunc (%s %s) UnmarshalMsg(bts []byte) (o []byte, err error) {", p.Varname(), methodReceiver(p)) |
| 51 | next(u, p) |
| 52 | u.p.print("\no = bts") |
| 53 | u.p.nakedReturn() |
| 54 | unsetReceiver(p) |
| 55 | return u.p.err |
| 56 | } |
| 57 | |
| 58 | // does assignment to the variable "name" with the type "base" |
| 59 | func (u *unmarshalGen) assignAndCheck(name string, base string) { |
nothing calls this directly
no test coverage detected