🏷️ Added IsMatched method for Header domain

This commit is contained in:
Maxim Lebedev 2023-12-09 12:25:53 +06:00
parent 10be636a05
commit f73500580a
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,19 @@
package domain
import (
"path"
)
type Header struct {
Headers 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
}