(typ string, argfmt string, arg any)
| 41 | } |
| 42 | |
| 43 | func (e *encodeGen) writeAndCheckWithArrayLimit(typ string, argfmt string, arg any) { |
| 44 | e.writeAndCheck(typ, argfmt, arg) |
| 45 | if e.ctx.marshalLimits && e.ctx.arrayLimit != math.MaxUint32 { |
| 46 | e.p.printf("\nif %s > %slimitArrays {", fmt.Sprintf(argfmt, arg), e.ctx.limitPrefix) |
| 47 | e.p.printf("\nerr = msgp.ErrLimitExceeded") |
| 48 | e.p.printf("\nreturn") |
| 49 | e.p.printf("\n}") |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func (e *encodeGen) writeAndCheckWithMapLimit(typ string, argfmt string, arg any) { |
| 54 | e.writeAndCheck(typ, argfmt, arg) |
no test coverage detected