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

Method decode

hcldec/spec.go:88–99  ·  view source on GitHub ↗
(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext)

Source from the content-addressed store, hash-verified

86}
87
88func (s ObjectSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
89 vals := make(map[string]cty.Value, len(s))
90 var diags hcl.Diagnostics
91
92 for k, spec := range s {
93 var kd hcl.Diagnostics
94 vals[k], kd = spec.decode(content, blockLabels, ctx)
95 diags = append(diags, kd...)
96 }
97
98 return cty.ObjectVal(vals), diags
99}
100
101func (s ObjectSpec) impliedType() cty.Type {
102 if len(s) == 0 {

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.65

Tested by

no test coverage detected