7 "github.com/zclconf/go-cty/cty"
8 "github.com/zclconf/go-cty/cty/set"
11 var valueType = reflect.TypeOf(cty.Value{})
12 var typeType = reflect.TypeOf(cty.Type{})
14 var setType = reflect.TypeOf(set.Set{})
16 var bigFloatType = reflect.TypeOf(big.Float{})
17 var bigIntType = reflect.TypeOf(big.Int{})
19 var emptyInterfaceType = reflect.TypeOf(interface{}(nil))
21 var stringType = reflect.TypeOf("")
23 // structTagIndices interrogates the fields of the given type (which must
24 // be a struct type, or we'll panic) and returns a map from the cty
25 // attribute names declared via struct tags to the indices of the
26 // fields holding those tags.
28 // This function will panic if two fields within the struct are tagged with
29 // the same cty attribute name.
30 func structTagIndices(st reflect.Type) map[string]int {
32 ret := make(map[string]int, ct)
34 for i := 0; i < ct; i++ {
36 attrName := field.Tag.Get("cty")