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

Struct DefaultSpec

hcldec/spec.go:1439–1442  ·  view source on GitHub ↗

DefaultSpec is a spec that wraps two specs, evaluating the primary first and then evaluating the default if the primary returns a null value. The two specifications must have the same implied result type for correct operation. If not, the result is undefined. Any requirements imposed by the "Defau

Source from the content-addressed store, hash-verified

1437// the default spec _does_ describe a nested block then the result is
1438// undefined.
1439type DefaultSpec struct {
1440 Primary Spec
1441 Default Spec
1442}
1443
1444func (s *DefaultSpec) visitSameBodyChildren(cb visitFunc) {
1445 cb(s.Primary)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected