(s string)
| 158 | type pattern map[string]struct{} |
| 159 | |
| 160 | func (p pattern) Match(s string) bool { |
| 161 | for v := range p { |
| 162 | match, err := filepath.Match(v, s) |
| 163 | if err != nil { |
| 164 | console.Error("%+v", err) |
| 165 | continue |
| 166 | } |
| 167 | if match { |
| 168 | return true |
| 169 | } |
| 170 | } |
| 171 | return false |
| 172 | } |
| 173 | |
| 174 | func (p pattern) list() []string { |
| 175 | ret := make([]string, 0, len(p)) |