format another way
This commit is contained in:
@ -158,7 +158,14 @@ func (r *radixMatcher) Register(pattern string) {
|
||||
}
|
||||
|
||||
func (r *radixMatcher) Patterns() []string {
|
||||
out := make([]string, len(r.saved))
|
||||
copy(out, r.saved)
|
||||
ownIdx := len(r.saved)
|
||||
out := make([]string, len(r.saved)+len(r.regexps))
|
||||
copy(out, r.saved[:ownIdx])
|
||||
|
||||
for i := 0; i < len(r.regexps); i++ {
|
||||
idx := i + ownIdx
|
||||
out[idx] = r.regexps[i].String()
|
||||
}
|
||||
|
||||
return out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user