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

Function IsSubNeeded

cft/parse/parse_sub.go:160–177  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

158}
159
160func IsSubNeeded(s string) bool {
161
162 words, err := ParseSub(s, true)
163 if err != nil {
164 config.Debugf("error in IsSubNeeded: %v", err)
165 return true
166 }
167 for _, w := range words {
168 switch w.T {
169 case STR:
170 // Ignore this
171 default:
172 // Anything else means it's needed
173 return true
174 }
175 }
176 return false
177}

Callers 5

TestIsSubNeededFunction · 0.92
mapPlaceholdersFunction · 0.92
replaceTemplateConstantsFunction · 0.92
OutputSubMethod · 0.92
ResolveSubMethod · 0.92

Calls 2

DebugfFunction · 0.92
ParseSubFunction · 0.85

Tested by 1

TestIsSubNeededFunction · 0.74