NewFmtCtxEx creates a FmtCtx.
(f FmtFlags, ann *Annotations)
| 278 | |
| 279 | // NewFmtCtxEx creates a FmtCtx. |
| 280 | func NewFmtCtxEx(f FmtFlags, ann *Annotations) *FmtCtx { |
| 281 | if ann == nil && f&flagsRequiringAnnotations != 0 { |
| 282 | panic(errors.AssertionFailedf("no Annotations provided")) |
| 283 | } |
| 284 | ctx := fmtCtxPool.Get().(*FmtCtx) |
| 285 | ctx.flags = f |
| 286 | ctx.ann = ann |
| 287 | return ctx |
| 288 | } |
| 289 | |
| 290 | // SetReformatTableNames modifies FmtCtx to to substitute the printing of table |
| 291 | // names using the provided function. |
no test coverage detected