16 lines
205 B
Go
16 lines
205 B
Go
|
package domain
|
||
|
|
||
|
type Redirects []Redirect
|
||
|
|
||
|
func (r Redirects) Match(p string) (*Redirect, bool) {
|
||
|
for i := range r {
|
||
|
if !r[i].IsMatch(p) {
|
||
|
continue
|
||
|
}
|
||
|
|
||
|
return &r[i], true
|
||
|
}
|
||
|
|
||
|
return nil, false
|
||
|
}
|