diff options
author | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
---|---|---|
committer | Nathan Dench <ndenc2@gmail.com> | 2019-05-24 15:16:44 +1000 |
commit | 107c1cdb09c575aa2f61d97f48d8587eb6bada4c (patch) | |
tree | ca7d008643efc555c388baeaf1d986e0b6b3e28c /vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go | |
parent | 844b5a68d8af4791755b8f0ad293cc99f5959183 (diff) | |
download | terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.gz terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.tar.zst terraform-provider-statuscake-107c1cdb09c575aa2f61d97f48d8587eb6bada4c.zip |
Upgrade to 0.12
Diffstat (limited to 'vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go')
-rw-r--r-- | vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go index fb24f20..664790b 100644 --- a/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go +++ b/vendor/github.com/zclconf/go-cty/cty/function/stdlib/format.go | |||
@@ -84,6 +84,11 @@ var FormatListFunc = function.New(&function.Spec{ | |||
84 | argTy := arg.Type() | 84 | argTy := arg.Type() |
85 | switch { | 85 | switch { |
86 | case (argTy.IsListType() || argTy.IsSetType() || argTy.IsTupleType()) && !arg.IsNull(): | 86 | case (argTy.IsListType() || argTy.IsSetType() || argTy.IsTupleType()) && !arg.IsNull(): |
87 | if !argTy.IsTupleType() && !arg.IsKnown() { | ||
88 | // We can't iterate this one at all yet then, so we can't | ||
89 | // yet produce a result. | ||
90 | return cty.UnknownVal(retType), nil | ||
91 | } | ||
87 | thisLen := arg.LengthInt() | 92 | thisLen := arg.LengthInt() |
88 | if iterLen == -1 { | 93 | if iterLen == -1 { |
89 | iterLen = thisLen | 94 | iterLen = thisLen |