MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / InterpolationNames

Function InterpolationNames

checks/http.go:210–220  ·  view source on GitHub ↗
(template string)

Source from the content-addressed store, hash-verified

208}
209
210func InterpolationNames(template string) []string {
211 r := regexp.MustCompile(`\$\{([^}]+)\}`)
212 matches := r.FindAllStringSubmatch(template, -1)
213 names := make([]string, 0, len(matches))
214 for _, match := range matches {
215 if len(match) > 1 {
216 names = append(names, match[1])
217 }
218 }
219 return names
220}
221
222func likelyBinary(b []byte) bool {
223 if len(b) == 0 {

Callers 3

TestInterpolationNamesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestInterpolationNamesFunction · 0.68