codegangsta/inject

Could anybody explain how to use this package?

Closed this issue · 4 comments

Hello, I've read readme, but still I can't figure out how to use it and where it can be applied. Could anybody give some sort of "helloworld" example?)

@kalopsia maybe you can take a look at the test_inject.go, or read martini's code.

@pengfei-xue I've already read martini's code, but it is the reason why I'm asking for here. I don't understand why it used for and why there is the need for yet another package make a "magic".

there is no magics here , the code is straight forward if you read the article on golang's blog about go reflection. There is no magic in go. Json and Xml and most database packages make use of the same injection schemes. So let's not say there is magic anywhere because there is none. This package is used in the Martini framework.

Yea I know that it's used in Martini - so I'm asking. Anyway thank you for explanation!) I close it)