mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-14 00:16:45 +00:00
Simplify string concat example in math.Add
This commit is contained in:
1 parent
42488bb097
commit
145a923598
1 file changed
+1
-6
@@ -26,10 +26,5 @@ If one of the numbers is a [`float`], the result is a `float`.
|
||||
You can also use the `add` function to concatenate strings.
|
||||
|
||||
```go-html-template
|
||||
{{ $s := slice "h" "u" "g" "o" }}
|
||||
{{ $t := "" }}
|
||||
{{ range $s }}
|
||||
{{ $t = add $t . }}
|
||||
{{ end }}
|
||||
{{ $t }} → hugo
|
||||
{{ add "hu" "go" }} → hugo
|
||||
```
|
||||
Reference in new issue
Block a user