terraform/lang/funcs
Martin Atkins 742deca3e9 lang/funcs: Short-circuit if start or end index is unknown
Previously the type-selection codepath for an input tuple referred
unconditionally to the start and end index values. In the Type callback,
only the types of the arguments are guaranteed to be known, so any access
to the values must be guarded with an .IsKnown check, or else the function
will not short-circuit properly when an unknown value is passed.

Now we will check the start and end indices are in range when we have
enough information to do so, but we'll return an approximate result if
either is unknown.
2019-05-17 08:48:02 -07:00
..
testdata lang/funcs: templatefile function 2018-12-21 08:06:14 -08:00
cidr.go port compact function 2018-10-16 18:49:20 -07:00
cidr_test.go port cidr functions 2018-10-16 18:49:20 -07:00
collection.go lang/funcs: Short-circuit if start or end index is unknown 2019-05-17 08:48:02 -07:00
collection_test.go lang/funcs: Short-circuit if start or end index is unknown 2019-05-17 08:48:02 -07:00
conversion.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
conversion_test.go lang/funcs: Type conversion functions 2019-01-17 10:01:47 -08:00
crypto.go lang/funcs: Fix filebase64sha256 function hashing algorithm 2019-03-12 12:59:36 -04:00
crypto_test.go lang/funcs: Fix filebase64sha256 function hashing algorithm 2019-03-12 12:59:36 -04:00
datetime.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
datetime_test.go cleanup comments for nicer godocs 2018-10-16 18:49:20 -07:00
encoding.go base64decode: check that the decoded (not encoded) string is valid UTF-8 2018-10-16 18:49:20 -07:00
encoding_test.go base64decodeFunc now checks for valid UTF-8 2018-10-16 18:49:20 -07:00
filesystem.go lang/funcs: Fix out-of-bounds ArgError in templatefile function 2019-03-19 16:23:51 -07:00
filesystem_test.go lang/funcs: Fix out-of-bounds ArgError in templatefile function 2019-03-19 16:23:51 -07:00
number.go porting functions 2018-10-16 18:49:20 -07:00
number_test.go porting functions 2018-10-16 18:49:20 -07:00
string.go lang/funcs: Fix panic in "join" when an element is null 2019-02-07 14:35:13 -08:00
string_test.go porting many functions 2018-10-16 18:49:20 -07:00