mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
govendor fetch github.com/zclconf/go-cty/...
This commit is contained in:
parent
096847c9f7
commit
f78fe3c01e
9
vendor/github.com/zclconf/go-cty/cty/types_to_register.go
generated
vendored
9
vendor/github.com/zclconf/go-cty/cty/types_to_register.go
generated
vendored
@ -2,7 +2,9 @@ package cty
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/zclconf/go-cty/cty/set"
|
"github.com/zclconf/go-cty/cty/set"
|
||||||
)
|
)
|
||||||
@ -45,6 +47,11 @@ func init() {
|
|||||||
// Register these with gob here, rather than in gob.go, to ensure
|
// Register these with gob here, rather than in gob.go, to ensure
|
||||||
// that this will always happen after we build the above.
|
// that this will always happen after we build the above.
|
||||||
for _, tv := range InternalTypesToRegister {
|
for _, tv := range InternalTypesToRegister {
|
||||||
gob.Register(tv)
|
typeName := fmt.Sprintf("%T", tv)
|
||||||
|
if strings.HasPrefix(typeName, "cty.") {
|
||||||
|
gob.RegisterName(fmt.Sprintf("github.com/zclconf/go-cty/%s", typeName), tv)
|
||||||
|
} else {
|
||||||
|
gob.Register(tv)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
24
vendor/github.com/zclconf/go-cty/cty/value_ops.go
generated
vendored
24
vendor/github.com/zclconf/go-cty/cty/value_ops.go
generated
vendored
@ -737,6 +737,30 @@ func (val Value) HasIndex(key Value) Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// HasElement returns True if the receiver (which must be of a set type)
|
||||||
|
// has the given value as an element, or False if it does not.
|
||||||
|
//
|
||||||
|
// The result will be UnknownVal(Bool) if either the set or the
|
||||||
|
// given value are unknown.
|
||||||
|
//
|
||||||
|
// This method will panic if the receiver is not a set, or if it is a null set.
|
||||||
|
func (val Value) HasElement(elem Value) Value {
|
||||||
|
ty := val.Type()
|
||||||
|
|
||||||
|
if !ty.IsSetType() {
|
||||||
|
panic("not a set type")
|
||||||
|
}
|
||||||
|
if !val.IsKnown() || !elem.IsKnown() {
|
||||||
|
return UnknownVal(Bool)
|
||||||
|
}
|
||||||
|
if val.IsNull() {
|
||||||
|
panic("can't call HasElement on a nil value")
|
||||||
|
}
|
||||||
|
|
||||||
|
s := val.v.(set.Set)
|
||||||
|
return BoolVal(s.Has(elem.v))
|
||||||
|
}
|
||||||
|
|
||||||
// Length returns the length of the receiver, which must be a collection type
|
// Length returns the length of the receiver, which must be a collection type
|
||||||
// or tuple type, as a number value. If the receiver is not a compatible type
|
// or tuple type, as a number value. If the receiver is not a compatible type
|
||||||
// then this method will panic.
|
// then this method will panic.
|
||||||
|
30
vendor/vendor.json
vendored
30
vendor/vendor.json
vendored
@ -2132,46 +2132,46 @@
|
|||||||
"revisionTime": "2016-10-29T10:40:18Z"
|
"revisionTime": "2016-10-29T10:40:18Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "R9ayYqxeUsPcIbs6KXCVwDIdf6M=",
|
"checksumSHA1": "TudZOVOvOvR5zw7EFbvD3eZpmLI=",
|
||||||
"path": "github.com/zclconf/go-cty/cty",
|
"path": "github.com/zclconf/go-cty/cty",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "IjvfMUZ9S1L1NM0haXwMfKzkyvM=",
|
"checksumSHA1": "IjvfMUZ9S1L1NM0haXwMfKzkyvM=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/convert",
|
"path": "github.com/zclconf/go-cty/cty/convert",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "TU21yqpRZdbEbH8pp4I5YsQa00E=",
|
"checksumSHA1": "TU21yqpRZdbEbH8pp4I5YsQa00E=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/function",
|
"path": "github.com/zclconf/go-cty/cty/function",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "Ke4kpRBTSophcLSCrusR8XxSC0Y=",
|
"checksumSHA1": "Ke4kpRBTSophcLSCrusR8XxSC0Y=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/function/stdlib",
|
"path": "github.com/zclconf/go-cty/cty/function/stdlib",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "tmCzwfNXOEB1sSO7TKVzilb2vjA=",
|
"checksumSHA1": "tmCzwfNXOEB1sSO7TKVzilb2vjA=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/gocty",
|
"path": "github.com/zclconf/go-cty/cty/gocty",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "1ApmO+Q33+Oem/3f6BU6sztJWNc=",
|
"checksumSHA1": "1ApmO+Q33+Oem/3f6BU6sztJWNc=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/json",
|
"path": "github.com/zclconf/go-cty/cty/json",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "gH4rRyzIQknMIXAJfpvC04KTsME=",
|
"checksumSHA1": "gH4rRyzIQknMIXAJfpvC04KTsME=",
|
||||||
"path": "github.com/zclconf/go-cty/cty/set",
|
"path": "github.com/zclconf/go-cty/cty/set",
|
||||||
"revision": "8bf222d6d03b7b336d013978f3acbfd877da428f",
|
"revision": "709e4033eeb037dc543dbc2048065dfb814ce316",
|
||||||
"revisionTime": "2017-10-13T21:58:09Z"
|
"revisionTime": "2018-01-06T05:58:34Z"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"checksumSHA1": "vE43s37+4CJ2CDU6TlOUOYE0K9c=",
|
"checksumSHA1": "vE43s37+4CJ2CDU6TlOUOYE0K9c=",
|
||||||
|
Loading…
Reference in New Issue
Block a user