Simplified DI resolution

This commit is contained in:
Deluan 2016-03-11 15:16:17 -05:00
parent e9861e1b26
commit f4c1dbdd3c
8 changed files with 12 additions and 22 deletions

View file

@ -25,8 +25,10 @@ func DefineSingleton(ptr interface{}, constructor interface{}) interface{} {
return ptr
}
func ResolveDependency(ptr interface{}) {
inject.ExtractAssignable(Graph, ptr)
func ResolveDependencies(ptrs ...interface{}) {
for _, p := range ptrs {
inject.ExtractAssignable(Graph, p)
}
}
func init() {