Created
October 22, 2014 04:15
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controllers | |
// ... | |
func Home(p *wade.PageScope) error { | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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