(indent int, f func())
| 97 | } |
| 98 | |
| 99 | func (fc *funcContext) CatchOutput(indent int, f func()) []byte { |
| 100 | origoutput := fc.output |
| 101 | fc.output = nil |
| 102 | fc.pkgCtx.indentation += indent |
| 103 | f() |
| 104 | fc.writePos() |
| 105 | caught := fc.output |
| 106 | fc.output = origoutput |
| 107 | fc.pkgCtx.indentation -= indent |
| 108 | return caught |
| 109 | } |
| 110 | |
| 111 | func (fc *funcContext) Delayed(f func()) { |
| 112 | fc.delayedOutput = fc.CatchOutput(0, f) |
no test coverage detected