MCPcopy
hub / github.com/tinylib/msgp / Execute

Method Execute

gen/decode.go:35–57  ·  view source on GitHub ↗
(p Elem, ctx Context)

Source from the content-addressed store, hash-verified

33}
34
35func (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
59func (d *decodeGen) gStruct(s *Struct) {
60 if !d.p.ok() {

Callers

nothing calls this directly

Calls 10

IsPrintableFunction · 0.85
methodReceiverFunction · 0.85
nextFunction · 0.85
unsetReceiverFunction · 0.85
applyallMethod · 0.80
okMethod · 0.80
commentMethod · 0.80
printfMethod · 0.80
nakedReturnMethod · 0.80
VarnameMethod · 0.65

Tested by

no test coverage detected