Instance Store properly.
Interface by default, then the custom one.
This commit is contained in:
parent
4f7b3aa42a
commit
aafe5c6249
@ -6,14 +6,16 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Depending on config we should open one store or other (Gorm, File,
|
|
||||||
// Git...)
|
|
||||||
var (
|
var (
|
||||||
store model.StoreGorm
|
store model.Store
|
||||||
)
|
)
|
||||||
|
|
||||||
func Serve() {
|
func Serve() {
|
||||||
|
|
||||||
// Store instance
|
// Store instance
|
||||||
|
// Depending on config we should open one store or other
|
||||||
|
// (Gorm, File, Git...)
|
||||||
|
store = new(model.StoreGorm)
|
||||||
err := store.Open()
|
err := store.Open()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicln(err)
|
log.Panicln(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user