FindUnknownPlaceholders returns the list of unrecognized ${...} placeholders found in the given value. Escaped placeholders ($${...}) are ignored.
(value string)
| 94 | // FindUnknownPlaceholders returns the list of unrecognized ${...} placeholders |
| 95 | // found in the given value. Escaped placeholders ($${...}) are ignored. |
| 96 | func FindUnknownPlaceholders(value string) []string { |
| 97 | var unknown []string |
| 98 | for _, match := range envPlaceholderRegexp.FindAllStringSubmatch(value, -1) { |
| 99 | // Only odd dollar counts are real placeholders. |
| 100 | if len(match[1])%2 == 1 && !knownPlaceholders[match[2]] { |
| 101 | unknown = append(unknown, "${"+match[2]+"}") |
| 102 | } |
| 103 | } |
| 104 | return unknown |
| 105 | } |
no outgoing calls
no test coverage detected