Browse Source

BaseController.Path is now mandatory.

multiapp-subsubapp
Benjamin Shelton 4 months ago
parent
commit
40eaae5c81
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      router_bind.go

+ 4
- 0
router_bind.go View File

@ -40,6 +40,10 @@ func (r *Router) Bind(endpoint Controller) error {
r.dependencies.Apply(endpoint)
route, props := r.toRoute(endpoint)
if endpoint.path() == "" {
panic("BaseController.Path must be set for endpoint")
}
r.cnames[route.Name] = struct{}{}
r.pathmap[endpoint.path()] = route


Loading…
Cancel
Save