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

Method PartialContent

ext/dynblock/unknown_body.go:52–61  ·  view source on GitHub ↗
(schema *hcl.BodySchema)

Source from the content-addressed store, hash-verified

50}
51
52func (b unknownBody) PartialContent(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Body, hcl.Diagnostics) {
53 content, remain, diags := b.template.PartialContent(schema)
54 content = b.fixupContent(content)
55 remain = unknownBody{template: remain, valueMarks: b.valueMarks} // remaining content must also be wrapped
56
57 // We're intentionally preserving the diagnostics reported from the
58 // inner body so that we can still report where the template body doesn't
59 // match the requested schema.
60 return content, remain, diags
61}
62
63func (b unknownBody) JustAttributes() (hcl.Attributes, hcl.Diagnostics) {
64 attrs, diags := b.template.JustAttributes()

Callers

nothing calls this directly

Calls 2

fixupContentMethod · 0.95
PartialContentMethod · 0.65

Tested by

no test coverage detected