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

Method decode

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

Source from the content-addressed store, hash-verified

128}
129
130func (s TupleSpec) decode(content *hcl.BodyContent, blockLabels []blockLabel, ctx *hcl.EvalContext) (cty.Value, hcl.Diagnostics) {
131 vals := make([]cty.Value, len(s))
132 var diags hcl.Diagnostics
133
134 for i, spec := range s {
135 var ed hcl.Diagnostics
136 vals[i], ed = spec.decode(content, blockLabels, ctx)
137 diags = append(diags, ed...)
138 }
139
140 return cty.TupleVal(vals), diags
141}
142
143func (s TupleSpec) impliedType() cty.Type {
144 if len(s) == 0 {

Callers

nothing calls this directly

Calls 1

decodeMethod · 0.65

Tested by

no test coverage detected