Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about injector Get method #22

Open
lmliang opened this issue Aug 29, 2014 · 1 comment
Open

about injector Get method #22

lmliang opened this issue Aug 29, 2014 · 1 comment

Comments

@lmliang
Copy link

lmliang commented Aug 29, 2014

injector using a map stored values, use type in the Get method to obtain value. If there is more value will be lost if the same type value, for example there are two Int64 value. I was a novice, I'm not sure.

@lmliang lmliang closed this as completed Aug 30, 2014
@lmliang lmliang reopened this Sep 9, 2014
@coldfire-x
Copy link

you need to create a new type for the second int64, for example:

dep := "some dependency"
injector.Map(dep)
dep2 := "another dep"
injector.MapTo(dep2, (*SpecialString)(nil))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants