func (m MashupModule) Start(config conf.ConfigFile) error { // TODO check for DB, etc... controller := mashup.OtterAPIController{} // bind the controller goweb.MapRest("/otter", controller) return nil }
func main() { controller := new(MyController) goweb.MapRest("/api", controller) goweb.ListenAndServe(":8080") }
func Init(db *mgo.Database) { log.Println("Initializing article package") controller := NewController(db) goweb.MapRest("/articles", controller) }