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

added simple dependency provider #16

Closed
wants to merge 2 commits into from
Closed

added simple dependency provider #16

wants to merge 2 commits into from

Conversation

stephanos
Copy link

  • values can be created by factory
  • factory is a simple function
  • factory results are cached
  • factory can depend on other factory
  • dependency loop detection (plus detailed error description)

 - values can be created by factory
 - factory is a simple function
 - factory results are cached
 - factory can depend on other factory
 - dependency loop detection (plus detailed error description)
@stephanos
Copy link
Author

Initial implementation for issue #10.

@stephanos stephanos mentioned this pull request Mar 2, 2014
@@ -49,10 +49,11 @@ type TypeMapper interface {
Set(reflect.Type, reflect.Value) TypeMapper
// Returns the Value that is mapped to the current type. Returns a zeroed Value if
// the Type has not been mapped.
Get(reflect.Type) reflect.Value
Get(reflect.Type, ...bool) reflect.Value
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make more sense to have another method instead of passing a bool to the Get function?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, off the top of my head: yes, it might. Maybe GetRoot(reflect.Type) reflect.Value.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this a subtle hint for me to make this change? I can't handle subtle ;)

@codegangsta
Copy link
Owner

I'm going to sit on this for a bit. I'm not super sure about the implementation and I may need to dive into the code a bit more and get a feel for it

@stephanos
Copy link
Author

Sure. That's what it's there for: getting the ball rollin' :)

If you tell me your worries we could discuss it.

@stephanos
Copy link
Author

@codegangsta I'll be working on it again this weekend. If you shared your concerns with the implementation I could improve it ...

@stephanos stephanos closed this May 11, 2014
@stephanos
Copy link
Author

@codegangsta it seems you aren't really interested in working this out. So closing it now. If you change your mind, my fork can be found here: https://github.com/101loops/inject

@codegangsta
Copy link
Owner

Apologies for the lack of response. We may revisit this in a later version but it adds a little too much complexity at the moment.

Sent from my iPhone

On May 11, 2014, at 11:09 AM, Stephan Behnke [email protected] wrote:

@codegangsta it seems you aren't really interested in working this out. So closing it now. If you change your mind my fork can be found here: https://github.com/101loops/inject


Reply to this email directly or view it on GitHub.

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

Successfully merging this pull request may close these issues.

2 participants