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

Struct BlockLabelSpec

hcldec/spec.go:1357–1360  ·  hcldec/spec.go::BlockLabelSpec

A BlockLabelSpec is a Spec that returns a cty.String representing the label of the block its given body belongs to, if indeed its given body belongs to a block. It is a programming error to use this in a non-block context, so this spec will panic in that case. This spec only works in the nested spe

Source from the content-addressed store, hash-verified

1355// consecutive set of indices starting at zero. The maximum index found
1356// defines how many labels the corresponding blocks must have in cty source.
1357type BlockLabelSpec struct {
1358 Index int
1359 Name string
1360}
1361
1362func (s *BlockLabelSpec) visitSameBodyChildren(cb visitFunc) {
1363 // leaf node

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected