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

Method Traverse

traversal.go:199–207  ·  view source on GitHub ↗

Traverse is a convenience function to apply TraverseAbs followed by TraverseRel.

(ctx *EvalContext)

Source from the content-addressed store, hash-verified

197// Traverse is a convenience function to apply TraverseAbs followed by
198// TraverseRel.
199func (t TraversalSplit) Traverse(ctx *EvalContext) (cty.Value, Diagnostics) {
200 v1, diags := t.TraverseAbs(ctx)
201 if diags.HasErrors() {
202 return cty.DynamicVal, diags
203 }
204 v2, newDiags := t.TraverseRel(v1)
205 diags = append(diags, newDiags...)
206 return v2, diags
207}
208
209// Join concatenates together the Abs and Rel parts to produce a single
210// absolute traversal.

Callers

nothing calls this directly

Calls 3

TraverseAbsMethod · 0.95
TraverseRelMethod · 0.95
HasErrorsMethod · 0.80

Tested by

no test coverage detected