terraform/internal/lang/funcs
Alisdair McDiarmid 0764726e3e functions: Fix sum() of all strings
The sum() function accepts a collection of values which must all convert
to numbers. It is valid for this to be a collection of string values
representing numbers.

Previously the function would panic if the first element of a collection
was a non-number type, as we didn't attempt to convert it to a number
before calling the cty `Add` method.
2022-03-16 08:50:06 -04:00
..
testdata lang: Redact sensitive values from function errors 2021-12-03 09:46:57 -05:00
cidr.go lang/funcs: Preserve IP address leading zero behavior from Go 1.16 2021-08-17 15:20:05 -07:00
cidr_test.go build: Run staticcheck with "go run" 2021-10-12 11:42:17 -07:00
collection.go functions: Fix sum() of all strings 2022-03-16 08:50:06 -04:00
collection_test.go functions: Fix sum() of all strings 2022-03-16 08:50:06 -04:00
conversion.go lang: Further limit the console-only type function 2022-02-10 06:12:58 -05:00
conversion_test.go lang: Further limit the console-only type function 2022-02-10 06:12:58 -05:00
crypto.go funcs: defer close file in funcs 2021-11-16 09:25:49 +01:00
crypto_test.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
datetime.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
datetime_test.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
defaults.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
defaults_test.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
encoding.go lang: Redact sensitive values from function errors 2021-12-03 09:46:57 -05:00
encoding_test.go lang: Redact sensitive values from function errors 2021-12-03 09:46:57 -05:00
filesystem.go lang/funcs: fileexists slightly better "not a file" error message 2022-01-11 08:46:29 -08:00
filesystem_test.go lang/funcs: fileexists slightly better "not a file" error message 2022-01-11 08:46:29 -08:00
number.go lang: Redact sensitive values from function errors 2021-12-03 09:46:57 -05:00
number_test.go lang: Remove use of marks.Raw in tests 2022-02-09 17:43:54 -05:00
redact.go lang: Redact sensitive values from function errors 2021-12-03 09:46:57 -05:00
redact_test.go lang: Remove use of marks.Raw in tests 2022-02-09 17:43:54 -05:00
sensitive.go marks package 2021-06-25 12:35:51 -04:00
sensitive_test.go update to use typed sensitive marks 2021-06-25 12:49:07 -04:00
string.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00
string_test.go Move lang/ to internal/lang/ 2021-05-17 14:09:07 -07:00