()
| 148 | } |
| 149 | |
| 150 | func (p *parser) emitImportsUse() { |
| 151 | if p.importsUseEmitted { |
| 152 | return |
| 153 | } |
| 154 | p.Printf(`import ( |
| 155 | qtio%s "io" |
| 156 | |
| 157 | qt%s "github.com/valyala/quicktemplate" |
| 158 | ) |
| 159 | `, mangleSuffix, mangleSuffix) |
| 160 | p.Printf(`var ( |
| 161 | _ = qtio%s.Copy |
| 162 | _ = qt%s.AcquireByteBuffer |
| 163 | ) |
| 164 | `, mangleSuffix, mangleSuffix) |
| 165 | p.importsUseEmitted = true |
| 166 | } |
| 167 | |
| 168 | func (p *parser) parseFunc() error { |
| 169 | s := p.s |