ParseSegmentAsSubroute parses the segment such that its subdirectives are themselves treated as directives, from which a subroute is built and returned.
(h Helper)
| 342 | // are themselves treated as directives, from which a subroute is built |
| 343 | // and returned. |
| 344 | func ParseSegmentAsSubroute(h Helper) (caddyhttp.MiddlewareHandler, error) { |
| 345 | allResults, err := parseSegmentAsConfig(h) |
| 346 | if err != nil { |
| 347 | return nil, err |
| 348 | } |
| 349 | |
| 350 | return buildSubroute(allResults, h.groupCounter, true) |
| 351 | } |
| 352 | |
| 353 | // parseSegmentAsConfig parses the segment such that its subdirectives |
| 354 | // are themselves treated as directives, including named matcher definitions, |
no test coverage detected