codegangsta/inject — pull request #15 by beatrichartz (2014-02-07 12:52:53+00:00)
Title: Added Set method to directly set injection values

Hey there

This PR provides a Set API to directly set reflection types to reflection values. There are some cases with channels where mapping with Map is not sufficient and mapping with MapTo is not possible because no valid interface can be provided:

If there's two channels of the same type, and we want to map one of them to a receiving channel and the other to a sending channel, currently we'd have to get the interface pointer of a receiving channel and one of a sending channel to be able to pass them to MapTo. But using [reflect.MakeChan](http://golang.org/pkg/reflect/#MakeChan), there's no possibility to instantiate unidirectional channels (which makes sense), so there's no possibility to instantiate that interface.

Also, a Set method makes life easier for those using reflection in their projects.

What do you think?

(the PR will not pass on wercker since the test file has a hardcoded reference to this repo)