(typ string, argfmt string, arg any)
| 51 | } |
| 52 | |
| 53 | func (e *encodeGen) writeAndCheckWithMapLimit(typ string, argfmt string, arg any) { |
| 54 | e.writeAndCheck(typ, argfmt, arg) |
| 55 | if e.ctx.marshalLimits && e.ctx.mapLimit != math.MaxUint32 { |
| 56 | e.p.printf("\nif %s > %slimitMaps {", fmt.Sprintf(argfmt, arg), e.ctx.limitPrefix) |
| 57 | e.p.printf("\nerr = msgp.ErrLimitExceeded") |
| 58 | e.p.printf("\nreturn") |
| 59 | e.p.printf("\n}") |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | func (e *encodeGen) fuseHook() { |
| 64 | if len(e.fuse) > 0 { |
no test coverage detected