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

Struct deepWrapper

ext/transform/transform.go:37–40  ·  view source on GitHub ↗

deepWrapper is a hcl.Body implementation that ensures that a given transformer is applied to another given body when content is extracted, and that it recursively applies to any child blocks that are extracted.

Source from the content-addressed store, hash-verified

35// transformer is applied to another given body when content is extracted,
36// and that it recursively applies to any child blocks that are extracted.
37type deepWrapper struct {
38 Transformed hcl.Body
39 Transformer Transformer
40}
41
42func (w deepWrapper) Content(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Diagnostics) {
43 content, diags := w.Transformed.Content(schema)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected