mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 10:18:40 +00:00
Update Include.md - improve return statement example
This commit is contained in:
1 parent
0371510730
commit
4d6d7018b9
1 file changed
+1
-1
@@ -68,7 +68,7 @@ Then, within the partial template:
|
|||||||
To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
|
To return a value from a partial template, it must contain only one `return` statement, placed at the end of the template:
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ $result := false }}
|
{{ $result := "" }}
|
||||||
{{ if math.ModBool . 2 }}
|
{{ if math.ModBool . 2 }}
|
||||||
{{ $result = "even" }}
|
{{ $result = "even" }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
|
|||||||
Reference in new issue
Block a user