Skip to content

Instantly share code, notes, and snippets.

@bykof
Last active February 18, 2020 13:15
Show Gist options
  • Save bykof/916294a20fddcf34beb4080e0589dbd4 to your computer and use it in GitHub Desktop.
Save bykof/916294a20fddcf34beb4080e0589dbd4 to your computer and use it in GitHub Desktop.
func (module *Module) Configure(injector *dingo.Injector) {
web.BindRoutes(injector, new(Routes))
if os.Getenv("fake") == "true" {
injector.Bind(new(service.IOrderService)).To(infrastructure.FakeOrderService{})
} else {
injector.Bind(new(service.IOrderService)).To(infrastructure.OrderService{})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment