20 lines
237 B
Go
20 lines
237 B
Go
package domain
|
|
|
|
import (
|
|
"path"
|
|
)
|
|
|
|
type Header struct {
|
|
Values map[string]string
|
|
Path string
|
|
}
|
|
|
|
func (h Header) IsMatched(p string) bool {
|
|
matched, err := path.Match(h.Path, p)
|
|
if err != nil {
|
|
return false
|
|
}
|
|
|
|
return matched
|
|
}
|