Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is recommended for performance-sensitive paths.
()
| 418 | // Close releases a FmtCtx for reuse. Closing a FmtCtx is not required, but is |
| 419 | // recommended for performance-sensitive paths. |
| 420 | func (ctx *FmtCtx) Close() { |
| 421 | ctx.Buffer.Reset() |
| 422 | ctx.flags = 0 |
| 423 | ctx.indexedVarFormat = nil |
| 424 | ctx.tableNameFormatter = nil |
| 425 | ctx.placeholderFormat = nil |
| 426 | fmtCtxPool.Put(ctx) |
| 427 | } |
| 428 | |
| 429 | // CloseAndGetString combines Close() and String(). |
| 430 | func (ctx *FmtCtx) CloseAndGetString() string { |
no test coverage detected