does: for idx := range iter { {{generate inner}} }
(ctx *Context, idx string, iter string, t traversal, inner Elem)
| 485 | // {{generate inner}} |
| 486 | // } |
| 487 | func (p *printer) rangeBlock(ctx *Context, idx string, iter string, t traversal, inner Elem) { |
| 488 | ctx.PushVar(idx) |
| 489 | // Tags on slices do not extend to the elements, so we always disable allownil on elements. |
| 490 | // If we want this to happen in the future, it should be a unique tag. |
| 491 | inner.SetIsAllowNil(false) |
| 492 | p.printf("\n for %s := range %s {", idx, iter) |
| 493 | next(t, inner) |
| 494 | p.closeblock() |
| 495 | ctx.Pop() |
| 496 | } |
| 497 | |
| 498 | func (p *printer) nakedReturn() { |
| 499 | if p.ok() { |
no test coverage detected