vendor: update github.com/hashicorp/hcl/v2 to v2.19.1

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-10-19 14:49:10 +02:00
parent ad674e2666
commit 34b9a629a0
157 changed files with 20123 additions and 5438 deletions

View File

@ -9,7 +9,8 @@ import (
)
var ConcatFunc = function.New(&function.Spec{
Params: []function.Parameter{},
Description: `Concatenates together all of the given lists or tuples into a single sequence, preserving the input order.`,
Params: []function.Parameter{},
VarParam: &function.Parameter{
Name: "seqs",
Type: cty.DynamicPseudoType,
@ -73,6 +74,7 @@ var ConcatFunc = function.New(&function.Spec{
}
return cty.Tuple(etys), nil
},
RefineResult: refineNonNull,
Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
switch {
case retType.IsListType():
@ -137,11 +139,13 @@ var ConcatFunc = function.New(&function.Spec{
})
var RangeFunc = function.New(&function.Spec{
Description: `Returns a list of numbers spread evenly over a particular range.`,
VarParam: &function.Parameter{
Name: "params",
Type: cty.Number,
},
Type: function.StaticReturnType(cty.List(cty.Number)),
Type: function.StaticReturnType(cty.List(cty.Number)),
RefineResult: refineNonNull,
Impl: func(args []cty.Value, retType cty.Type) (ret cty.Value, err error) {
var start, end, step cty.Value
switch len(args) {