Skip to content

Instantly share code, notes, and snippets.

@bastianccm
Created February 26, 2020 13:05
Show Gist options
  • Save bastianccm/75ebb4c951355ed00412d59eadd00101 to your computer and use it in GitHub Desktop.
Save bastianccm/75ebb4c951355ed00412d59eadd00101 to your computer and use it in GitHub Desktop.
package polls
import "flamingo.me/flamingo/v3/framework/web"
type urls struct {
controller *controller
}
func (u *urls) Inject(controller *controller) {
u.controller = controller
}
func (u *urls) Routes(registry *web.RouterRegistry) {
registry.MustRoute("/", "index")
registry.HandleAny("index", u.controller.index)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment