mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-13 10:42:16 -04:00
@@ -109,6 +109,17 @@ func (r Route) Empty() bool {
|
||||
r.Group == ""
|
||||
}
|
||||
|
||||
func (r Route) String() string {
|
||||
handlersRaw := "["
|
||||
for _, hr := range r.HandlersRaw {
|
||||
handlersRaw += " " + string(hr)
|
||||
}
|
||||
handlersRaw += "]"
|
||||
|
||||
return fmt.Sprintf(`{Group:"%s" MatcherSetsRaw:%s HandlersRaw:%s Terminal:%t}`,
|
||||
r.Group, r.MatcherSetsRaw, handlersRaw, r.Terminal)
|
||||
}
|
||||
|
||||
// RouteList is a list of server routes that can
|
||||
// create a middleware chain.
|
||||
type RouteList []Route
|
||||
@@ -331,4 +342,15 @@ func (ms *MatcherSets) FromInterface(matcherSets any) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: Is this used?
|
||||
func (ms MatcherSets) String() string {
|
||||
result := "["
|
||||
for _, matcherSet := range ms {
|
||||
for _, matcher := range matcherSet {
|
||||
result += fmt.Sprintf(" %#v", matcher)
|
||||
}
|
||||
}
|
||||
return result + " ]"
|
||||
}
|
||||
|
||||
var routeGroupCtxKey = caddy.CtxKey("route_group")
|
||||
|
||||
Reference in New Issue
Block a user