@@ -16,13 +16,13 @@ import (
1616// replace _all_ of the blocks of the same type in "base" in the new
1717// body.
1818func MergeBodies (base , override hcl.Body ) hcl.Body {
19- return mergeBody {
19+ return MergeBody {
2020 Base : base ,
2121 Override : override ,
2222 }
2323}
2424
25- // mergeBody is a hcl.Body implementation that wraps a pair of other bodies
25+ // MergeBody is a hcl.Body implementation that wraps a pair of other bodies
2626// and allows attributes and blocks within the override to take precedence
2727// over those defined in the base body.
2828//
@@ -34,14 +34,14 @@ func MergeBodies(base, override hcl.Body) hcl.Body {
3434// This cannot possibly "do the right thing" in all cases, because we don't
3535// have enough information about user intent. However, this behavior is intended
3636// to be reasonable for simple overriding use-cases.
37- type mergeBody struct {
37+ type MergeBody struct {
3838 Base hcl.Body
3939 Override hcl.Body
4040}
4141
42- var _ hcl.Body = mergeBody {}
42+ var _ hcl.Body = MergeBody {}
4343
44- func (b mergeBody ) Content (schema * hcl.BodySchema ) (* hcl.BodyContent , hcl.Diagnostics ) {
44+ func (b MergeBody ) Content (schema * hcl.BodySchema ) (* hcl.BodyContent , hcl.Diagnostics ) {
4545 var diags hcl.Diagnostics
4646 baseSchema := schemaWithDynamic (schema )
4747 overrideSchema := schemaWithDynamic (schemaForOverrides (schema ))
@@ -56,7 +56,7 @@ func (b mergeBody) Content(schema *hcl.BodySchema) (*hcl.BodyContent, hcl.Diagno
5656 return content , diags
5757}
5858
59- func (b mergeBody ) PartialContent (schema * hcl.BodySchema ) (* hcl.BodyContent , hcl.Body , hcl.Diagnostics ) {
59+ func (b MergeBody ) PartialContent (schema * hcl.BodySchema ) (* hcl.BodyContent , hcl.Body , hcl.Diagnostics ) {
6060 var diags hcl.Diagnostics
6161 baseSchema := schemaWithDynamic (schema )
6262 overrideSchema := schemaWithDynamic (schemaForOverrides (schema ))
@@ -73,7 +73,7 @@ func (b mergeBody) PartialContent(schema *hcl.BodySchema) (*hcl.BodyContent, hcl
7373 return content , remain , diags
7474}
7575
76- func (b mergeBody ) prepareContent (base * hcl.BodyContent , override * hcl.BodyContent ) * hcl.BodyContent {
76+ func (b MergeBody ) prepareContent (base * hcl.BodyContent , override * hcl.BodyContent ) * hcl.BodyContent {
7777 content := & hcl.BodyContent {
7878 Attributes : make (hcl.Attributes ),
7979 }
@@ -120,7 +120,7 @@ func (b mergeBody) prepareContent(base *hcl.BodyContent, override *hcl.BodyConte
120120 return content
121121}
122122
123- func (b mergeBody ) JustAttributes () (hcl.Attributes , hcl.Diagnostics ) {
123+ func (b MergeBody ) JustAttributes () (hcl.Attributes , hcl.Diagnostics ) {
124124 var diags hcl.Diagnostics
125125 ret := make (hcl.Attributes )
126126
@@ -139,6 +139,6 @@ func (b mergeBody) JustAttributes() (hcl.Attributes, hcl.Diagnostics) {
139139 return ret , diags
140140}
141141
142- func (b mergeBody ) MissingItemRange () hcl.Range {
142+ func (b MergeBody ) MissingItemRange () hcl.Range {
143143 return b .Base .MissingItemRange ()
144144}
0 commit comments