(template string)
| 208 | } |
| 209 | |
| 210 | func 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 | |
| 222 | func likelyBinary(b []byte) bool { |
| 223 | if len(b) == 0 { |
no outgoing calls