Last active
July 3, 2020 12:34
-
-
Save bykof/358dc04483d52ef858fcb99fc225b574 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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