mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
explanatory comment for CompileMasks
This commit is contained in:
parent
be0dedf260
commit
d092f6b330
2 changed files with 3 additions and 6 deletions
|
|
@ -432,12 +432,6 @@ func (set *UserMaskSet) Length() int {
|
|||
return len(set.masks)
|
||||
}
|
||||
|
||||
// setRegexp generates a regular expression from the set of user mask
|
||||
// strings. Masks are split at the two types of wildcards, `*` and
|
||||
// `?`. All the pieces are meta-escaped. `*` is replaced with `.*`,
|
||||
// the regexp equivalent. Likewise, `?` is replaced with `.`. The
|
||||
// parts are re-joined and finally all masks are joined into a big
|
||||
// or-expression.
|
||||
func (set *UserMaskSet) setRegexp() {
|
||||
set.RLock()
|
||||
maskExprs := make([]string, len(set.masks))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue