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

Method Content

merged.go:88–93  ·  view source on GitHub ↗

Content returns the content produced by applying the given schema to all of the merged bodies and merging the result. Although required attributes _are_ supported, they should be used sparingly with merged bodies since in this case there is no contextual information with which to return good diagno

(schema *BodySchema)

Source from the content-addressed store, hash-verified

86// bodies may wish to mark all attributes as optional and then check for
87// required attributes afterwards, to produce better diagnostics.
88func (mb mergedBodies) Content(schema *BodySchema) (*BodyContent, Diagnostics) {
89 // the returned body will always be empty in this case, because mergedContent
90 // will only ever call Content on the child bodies.
91 content, _, diags := mb.mergedContent(schema, false)
92 return content, diags
93}
94
95func (mb mergedBodies) PartialContent(schema *BodySchema) (*BodyContent, Body, Diagnostics) {
96 return mb.mergedContent(schema, true)

Callers

nothing calls this directly

Calls 1

mergedContentMethod · 0.95

Tested by

no test coverage detected