MCPcopy Create free account
hub / github.com/aws-cloudformation/rain / processRainSection

Function processRainSection

cft/pkg/pkg.go:109–133  ·  view source on GitHub ↗

processRainSection returns true if the Rain section of the template existed The section is removed by this function

(t *cft.Template)

Source from the content-addressed store, hash-verified

107// processRainSection returns true if the Rain section of the template existed
108// The section is removed by this function
109func processRainSection(t *cft.Template) error {
110 t.Constants = make(map[string]*yaml.Node)
111 rainNode, err := t.GetSection(cft.Rain)
112 if err != nil {
113 // This is okay, not all templates have a Rain section
114 return nil
115 }
116
117 HasRainSection = true
118
119 err = processConstants(t, rainNode)
120 if err != nil {
121 return err
122 }
123
124 err = processPackages(t, t.Node)
125 if err != nil {
126 return err
127 }
128
129 // Now remove the Rain node from the template
130 t.RemoveSection(cft.Rain)
131
132 return nil
133}
134
135// Template returns t with assets included as per AWS CLI packaging rules
136// and any Rain:: functions used.

Callers 3

processModuleFunction · 0.85
moduleFunction · 0.85
TemplateFunction · 0.85

Calls 4

processConstantsFunction · 0.85
processPackagesFunction · 0.85
GetSectionMethod · 0.80
RemoveSectionMethod · 0.80

Tested by

no test coverage detected