(rawRegexp *regexp.Regexp)
| 47 | } |
| 48 | |
| 49 | func NewRegexp(rawRegexp *regexp.Regexp) *Regexp { |
| 50 | var reg = &Regexp{ |
| 51 | exp: rawRegexp.String(), |
| 52 | rawRegexp: rawRegexp, |
| 53 | } |
| 54 | reg.init() |
| 55 | return reg |
| 56 | } |
| 57 | |
| 58 | func (this *Regexp) init() { |
| 59 | this.id = atomic.AddUint64(&lastId, 1) |