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
+1 -2
View File
@@ -6,7 +6,6 @@ import (
"github.com/deluan/gosonic/domain"
"github.com/deluan/gosonic/engine"
"github.com/deluan/gosonic/utils"
"github.com/karlkfi/inject"
)
type StreamController struct {
@@ -17,7 +16,7 @@ type StreamController struct {
}
func (c *StreamController) Prepare() {
inject.ExtractAssignable(utils.Graph, &c.repo)
utils.ResolveDependencies(&c.repo)
c.id = c.RequiredParamString("id", "id parameter required")