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

Function findTraversalForSpec

cmd/hclspecsuite/traversals.go:22–29  ·  view source on GitHub ↗
(want *TestFileExpectTraversal, have []hcl.Traversal)

Source from the content-addressed store, hash-verified

20}
21
22func findTraversalForSpec(want *TestFileExpectTraversal, have []hcl.Traversal) hcl.Traversal {
23 for _, candidate := range have {
24 if traversalsAreEquivalent(candidate, want.Traversal) {
25 return candidate
26 }
27 }
28 return nil
29}
30
31func traversalsAreEquivalent(a, b hcl.Traversal) bool {
32 if len(a) != len(b) {

Callers 1

runTestInputMethod · 0.85

Calls 1

traversalsAreEquivalentFunction · 0.85

Tested by

no test coverage detected