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

Struct BlockSpec

hcldec/spec.go:310–314  ·  view source on GitHub ↗

A BlockSpec is a Spec that produces a cty.Value by decoding the contents of a single nested block of a given type, using a nested spec. If the Required flag is not set, the nested block may be omitted, in which case a null value is produced. If it _is_ set, an error diagnostic is produced if there

Source from the content-addressed store, hash-verified

308// case a null value is produced. If it _is_ set, an error diagnostic is
309// produced if there are no nested blocks of the given type.
310type BlockSpec struct {
311 TypeName string
312 Nested Spec
313 Required bool
314}
315
316func (s *BlockSpec) visitSameBodyChildren(cb visitFunc) {
317 // leaf node ("Nested" does not use the same body)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected