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

Method decode

hcldec/spec.go:1449–1457  ·  hcldec/spec.go::DefaultSpec.decode
(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext)

Source from the content-addressed store, hash-verified

1447}
1448
1449func (s *DefaultSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
1450 val, diags := s.Primary.decode(content, blockLabels, ctx)
1451 if val.IsNull() {
1452 var moreDiags hcl.Diagnostics
1453 val, moreDiags = s.Default.decode(content, blockLabels, ctx)
1454 diags = append(diags, moreDiags...)
1455 }
1456 return val, diags
1457}
1458
1459func (s *DefaultSpec) impliedType() cty.Type {
1460 return s.Primary.impliedType()

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.65

Tested by

no test coverage detected