Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is recommended for performance-sensitive paths.
()
| 474 | // Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is |
| 475 | // recommended for performance-sensitive paths. |
| 476 | func (ctx *FmtCtx) Close() { |
| 477 | ctx.Buffer.Reset() |
| 478 | ctx.flags = 0 |
| 479 | ctx.indexedVarFormat = nil |
| 480 | ctx.tableNameFormatter = nil |
| 481 | ctx.placeholderFormat = nil |
| 482 | fmtCtxPool.Put(ctx) |
| 483 | } |
| 484 | |
| 485 | // CloseAndGetString combines Close() and String(). |
| 486 | func (ctx *FmtCtx) CloseAndGetString() string { |
no test coverage detected