(typ string, argfmt string, arg any)
| 29 | } |
| 30 | |
| 31 | func (e *encodeGen) writeAndCheck(typ string, argfmt string, arg any) { |
| 32 | if e.ctx.compFloats && typ == "Float64" { |
| 33 | typ = "Float" |
| 34 | } |
| 35 | if e.ctx.newTime && typ == "Time" { |
| 36 | typ = "TimeExt" |
| 37 | } |
| 38 | |
| 39 | e.p.printf("\nerr = en.Write%s(%s)", typ, fmt.Sprintf(argfmt, arg)) |
| 40 | e.p.wrapErrCheck(e.ctx.ArgsStr()) |
| 41 | } |
| 42 | |
| 43 | func (e *encodeGen) writeAndCheckWithArrayLimit(typ string, argfmt string, arg any) { |
| 44 | e.writeAndCheck(typ, argfmt, arg) |
no test coverage detected