MCPcopy
hub / github.com/hashicorp/hcl / walkVariablesWithHCLDec

Function walkVariablesWithHCLDec

ext/dynblock/variables_hcldec.go:33–46  ·  view source on GitHub ↗
(node WalkVariablesNode, spec hcldec.Spec)

Source from the content-addressed store, hash-verified

31}
32
33func walkVariablesWithHCLDec(node WalkVariablesNode, spec hcldec.Spec) []hcl.Traversal {
34 vars, children := node.Visit(hcldec.ImpliedSchema(spec))
35
36 if len(children) > 0 {
37 childSpecs := hcldec.ChildBlockTypes(spec)
38 for _, child := range children {
39 if childSpec, exists := childSpecs[child.BlockTypeName]; exists {
40 vars = append(vars, walkVariablesWithHCLDec(child.Node, childSpec)...)
41 }
42 }
43 }
44
45 return vars
46}

Callers 2

VariablesHCLDecFunction · 0.85
ExpandVariablesHCLDecFunction · 0.85

Calls 3

ImpliedSchemaFunction · 0.92
ChildBlockTypesFunction · 0.92
VisitMethod · 0.80

Tested by

no test coverage detected