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

Struct BlockAttrsSpec

hcldec/spec.go:1191–1195  ·  hcldec/spec.go::BlockAttrsSpec

A BlockAttrsSpec is a Spec that interprets a single block as if it were a map of some element type. That is, each attribute within the block becomes a key in the resulting map and the attribute's value becomes the element value, after conversion to the given element type. The resulting value is a ct

Source from the content-addressed store, hash-verified

1189// an AttrSpec is preferred if the desired result is a map whose keys are
1190// chosen by the user rather than by schema.
1191type BlockAttrsSpec struct {
1192 TypeName string
1193 ElementType cty.Type
1194 Required bool
1195}
1196
1197func (s *BlockAttrsSpec) visitSameBodyChildren(cb visitFunc) {
1198 // leaf node

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected