mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 12:14:49 +00:00
Update IncludeCached - improve return statement example
This commit is contained in:
1 parent
b053fa09c3
commit
0371510730
1 file changed
+1
-1
@@ -51,7 +51,7 @@ The variant arguments are not available to the underlying partial template; they
|
||||
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
|
||||
{{ $result := false }}
|
||||
{{ $result := "" }}
|
||||
{{ if math.ModBool . 2 }}
|
||||
{{ $result = "even" }}
|
||||
{{ else }}
|
||||
|
||||
Reference in new issue
Block a user