Skip to content

Instantly share code, notes, and snippets.

@bastianccm
Created February 26, 2020 13:08
Show Gist options
  • Save bastianccm/61c3d4a9f82a0ccd22b59025fcd65fd0 to your computer and use it in GitHub Desktop.
Save bastianccm/61c3d4a9f82a0ccd22b59025fcd65fd0 to your computer and use it in GitHub Desktop.
package polls
import (
"mysite/db"
"flamingo.me/dingo"
"flamingo.me/flamingo/v3/framework/web"
)
type Module struct{}
func (*Module) Configure(injector *dingo.Injector) {
web.BindRoutes(injector, new(urls))
}
func (*Module) Depends() []dingo.Module {
return []dingo.Module{
new(db.Module), // declare dependency to the db module
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment