inject icon indicating copy to clipboard operation
inject copied to clipboard

about injector Get method

Open lmliang opened this issue 10 years ago • 1 comments

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 avatar Aug 29 '14 14:08 lmliang

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))

coldfire-x avatar Feb 15 '15 07:02 coldfire-x