Started implementing getIndex, now with TDD (brought to you by DI)!
This commit is contained in:
@@ -1,15 +1,10 @@
|
||||
package conf
|
||||
|
||||
import (
|
||||
"github.com/deluan/gosonic/repositories"
|
||||
"github.com/deluan/gosonic/utils"
|
||||
"github.com/karlkfi/inject"
|
||||
"github.com/deluan/gosonic/repositories"
|
||||
)
|
||||
|
||||
func define(ptr interface{}, constructor interface{}, argPtrs ...interface{}) {
|
||||
utils.Graph.Define(ptr, inject.NewProvider(constructor, argPtrs...))
|
||||
}
|
||||
|
||||
func init () {
|
||||
define(new(repositories.ArtistIndex), repositories.NewArtistIndexRepository)
|
||||
utils.DefineSingleton(new(repositories.ArtistIndex), repositories.NewArtistIndexRepository)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user