()
| 43 | } |
| 44 | |
| 45 | func (r *HeaderRule) split() { |
| 46 | lines := bytes.Split([]byte(strings.TrimSpace(r.Header)), []byte("\n")) |
| 47 | r.headerLines = make([]*regexp.Regexp, len(lines)) |
| 48 | for i, line := range lines { |
| 49 | r.headerLines[i] = regexp.MustCompile(fmt.Sprintf("^%s$", string(line))) |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | func (r *HeaderRule) match(path string) (match bool) { |
| 54 | if len(r.Include) > 0 { |
no outgoing calls
no test coverage detected