MCPcopy
hub / github.com/go-chi/chi / IsMatch

Method IsMatch

middleware/route_headers.go:116–127  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

114}
115
116func (r HeaderRoute) IsMatch(value string) bool {
117 if len(r.MatchAny) > 0 {
118 for _, m := range r.MatchAny {
119 if m.Match(value) {
120 return true
121 }
122 }
123 } else if r.MatchOne.Match(value) {
124 return true
125 }
126 return false
127}
128
129type Pattern struct {
130 prefix string

Callers 1

HandlerMethod · 0.80

Calls 1

MatchMethod · 0.65

Tested by

no test coverage detected