From 5184fa4494d93c7dbe016c41ae282d016aa9590e Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Tue, 26 Jul 2022 13:29:27 -0400 Subject: Add coll.GoSlice and deprecate slice alias Signed-off-by: Dave Henderson --- docs-src/content/functions/math.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs-src/content/functions/math.yml') 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 -- cgit v1.2.3