Skip to content

Instantly share code, notes, and snippets.

@bykof
Last active July 3, 2020 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bykof/358dc04483d52ef858fcb99fc225b574 to your computer and use it in GitHub Desktop.
Save bykof/358dc04483d52ef858fcb99fc225b574 to your computer and use it in GitHub Desktop.
package dingo_example
import (
"example.com/dingo_example/infrastructure"
"example.com/dingo_example/interfaces"
"flamingo.me/dingo"
)
const ProductApiUrl = "https://my-product-api.com"
type Module struct{}
func (module *Module) Configure(injector *dingo.Injector) {
injector.Bind(new(string)).AnnotatedWith("config:productApiUrl").ToInstance(ProductApiUrl)
injector.Bind(new(infrastructure.ProductAPI)).To(infrastructure.ConcreteProductAPI{})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment