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

Function findTraversalSpec

cmd/hclspecsuite/traversals.go:13–20  ·  view source on GitHub ↗
(got hcl.Traversal, candidates []*TestFileExpectTraversal)

Source from the content-addressed store, hash-verified

11)
12
13func findTraversalSpec(got hcl.Traversal, candidates []*TestFileExpectTraversal) *TestFileExpectTraversal {
14 for _, candidate := range candidates {
15 if traversalsAreEquivalent(candidate.Traversal, got) {
16 return candidate
17 }
18 }
19 return nil
20}
21
22func findTraversalForSpec(want *TestFileExpectTraversal, have []hcl.Traversal) hcl.Traversal {
23 for _, candidate := range have {

Callers 1

runTestInputMethod · 0.85

Calls 1

traversalsAreEquivalentFunction · 0.85

Tested by

no test coverage detected