diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-07-26 13:29:27 -0400 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2022-09-25 10:45:38 -0400 |
| commit | 5184fa4494d93c7dbe016c41ae282d016aa9590e (patch) | |
| tree | 0f2053d5e2eb3b95e1f86e41e90f213c9a6b2364 /docs-src/content/functions/math.yml | |
| parent | ea83b8fac9d2e795f97372266eb9c7693136e9d8 (diff) | |
Add coll.GoSlice and deprecate slice alias
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src/content/functions/math.yml')
| -rw-r--r-- | docs-src/content/functions/math.yml | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs-src/content/functions/math.yml b/docs-src/content/functions/math.yml index 385b53d0..99c2a846 100644 --- a/docs-src/content/functions/math.yml +++ b/docs-src/content/functions/math.yml @@ -58,7 +58,7 @@ funcs: description: The input number. Will be converted to a `float64`, or `0` if not convertible examples: - | - $ gomplate -i '{{ range (slice 5.1 42 "3.14" "0xFF" "NaN" "Inf" "-0") }}ceil {{ printf "%#v" . }} = {{ math.Ceil . }}{{"\n"}}{{ end }}' + $ gomplate -i '{{ range (coll.Slice 5.1 42 "3.14" "0xFF" "NaN" "Inf" "-0") }}ceil {{ printf "%#v" . }} = {{ math.Ceil . }}{{"\n"}}{{ end }}' ceil 5.1 = 6 ceil 42 = 42 ceil "3.14" = 4 @@ -93,7 +93,7 @@ funcs: description: The input number. Will be converted to a `float64`, or `0` if not convertable examples: - | - $ gomplate -i '{{ range (slice 5.1 42 "3.14" "0xFF" "NaN" "Inf" "-0") }}floor {{ printf "%#v" . }} = {{ math.Floor . }}{{"\n"}}{{ end }}' + $ gomplate -i '{{ range (coll.Slice 5.1 42 "3.14" "0xFF" "NaN" "Inf" "-0") }}floor {{ printf "%#v" . }} = {{ math.Floor . }}{{"\n"}}{{ end }}' floor 5.1 = 4 floor 42 = 42 floor "3.14" = 3 @@ -112,7 +112,7 @@ funcs: description: The value to test examples: - | - $ gomplate -i '{{ range (slice 1.0 "-1.0" 5.1 42 "3.14" "foo" "0xFF" "NaN" "Inf" "-0") }}{{ if (math.IsFloat .) }}{{.}} is a float{{"\n"}}{{ end }}{{end}}' + $ gomplate -i '{{ range (coll.Slice 1.0 "-1.0" 5.1 42 "3.14" "foo" "0xFF" "NaN" "Inf" "-0") }}{{ if (math.IsFloat .) }}{{.}} is a float{{"\n"}}{{ end }}{{end}}' 1 is a float -1.0 is a float 5.1 is a float @@ -128,7 +128,7 @@ funcs: description: The value to test examples: - | - $ gomplate -i '{{ range (slice 1.0 "-1.0" 5.1 42 "3.14" "foo" "0xFF" "NaN" "Inf" "-0") }}{{ if (math.IsInt .) }}{{.}} is an integer{{"\n"}}{{ end }}{{end}}' + $ gomplate -i '{{ range (coll.Slice 1.0 "-1.0" 5.1 42 "3.14" "foo" "0xFF" "NaN" "Inf" "-0") }}{{ if (math.IsInt .) }}{{.}} is an integer{{"\n"}}{{ end }}{{end}}' 42 is an integer 0xFF is an integer -0 is an integer @@ -225,7 +225,7 @@ funcs: description: The input number. Will be converted to a `float64`, or `0` if not convertable examples: - | - $ gomplate -i '{{ range (slice -6.5 5.1 42.9 "3.5" 6.5) }}round {{ printf "%#v" . }} = {{ math.Round . }}{{"\n"}}{{ end }}' + $ gomplate -i '{{ range (coll.Slice -6.5 5.1 42.9 "3.5" 6.5) }}round {{ printf "%#v" . }} = {{ math.Round . }}{{"\n"}}{{ end }}' round -6.5 = -7 round 5.1 = 5 round 42.9 = 43 |
