parseURLPatterns parses a comma-separated list of wildcard patterns and converts them to compiled regular expressions using RegexpFromPattern.
(env string)
| 180 | // parseURLPatterns parses a comma-separated list of wildcard patterns and converts them |
| 181 | // to compiled regular expressions using RegexpFromPattern. |
| 182 | func parseURLPatterns(env string) ([]*regexp.Regexp, error) { |
| 183 | parts := strings.Split(env, ",") |
| 184 | result := make([]*regexp.Regexp, len(parts)) |
| 185 | |
| 186 | for i, p := range parts { |
| 187 | result[i] = RegexpFromPattern(strings.TrimSpace(p)) |
| 188 | } |
| 189 | |
| 190 | return result, nil |
| 191 | } |
| 192 | |
| 193 | // parseHexSlice parses a comma-separated list of hex-encoded strings and returns |
| 194 | // a slice of byte slices. |
nothing calls this directly
no test coverage detected