Debian Codegraph @

docs/content/en/functions/go-template/continue.md

raw
1 ---
2 title: continue
3 description: Used with the range statement, stops the innermost iteration and continues to the next iteration.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: []
9 returnType:
10 signatures: [continue]
11 ---
12
13 This template code:
14
15 ```go-html-template
16 {{ $s := slice "foo" "bar" "baz" }}
17 {{ range $s }}
18 {{ if eq . "bar" }}
19 {{ continue }}
20 {{ end }}
21 <p>{{ . }}</p>
22 {{ end }}
23 ```
24
25 Is rendered to:
26
27 ```html
28 <p>foo</p>
29 <p>baz</p>
30 ```
31
32 {{% include "/_common/functions/go-template/text-template.md" %}}