Skip to content

Instantly share code, notes, and snippets.

@albrow
Created October 22, 2014 04:15
Show Gist options
  • Save albrow/fe3c14f33f1f891ea075 to your computer and use it in GitHub Desktop.
Save albrow/fe3c14f33f1f891ea075 to your computer and use it in GitHub Desktop.
An alternative way of specifying controllers for wade.go that doesn't rely on string identifiers. (Concept only)
package controllers
// ...
func Home(p *wade.PageScope) error {
// ...
}
package main
import (
"controllers"
// ...
)
// ...
app.Router.Handle("/", wade.Page{
Id: "pg-home",
Title: "Home",
Controller: controllers.Home,
})
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment