should provide a valid matcher set, in my case using RegisterHandlerDirective seems more logical, because its a module in namespace http.handlers
func parseCaddyfile(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error) {
var g Guard
err := (&g).UnmarshalCaddyfile(h.Dispenser)
return h.NewRoute(caddy.ModuleMap{}, &g), err
}
feedback:
those things should be better documented in the docs, and as of for the reference, everything is split up in caddyhttpfile, caddyconfig this and that, was hard to find for me, idk how others experience it.