(ptr string)
| 25 | } |
| 26 | |
| 27 | func (this *Agent) Match(ptr string) bool { |
| 28 | if len(this.suffixes) > 0 { |
| 29 | for _, suffix := range this.suffixes { |
| 30 | if strings.HasSuffix(ptr, suffix) { |
| 31 | return true |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | if this.reg != nil { |
| 36 | return this.reg.MatchString(ptr) |
| 37 | } |
| 38 | return false |
| 39 | } |