Instance Store properly.

Interface by default, then the custom one.
This commit is contained in:
Óscar M. Lage 2022-03-18 23:36:26 +01:00
parent 4f7b3aa42a
commit aafe5c6249

View File

@ -6,14 +6,16 @@ import (
"log"
)
// Depending on config we should open one store or other (Gorm, File,
// Git...)
var (
store model.StoreGorm
store model.Store
)
func Serve() {
// Store instance
// Depending on config we should open one store or other
// (Gorm, File, Git...)
store = new(model.StoreGorm)
err := store.Open()
if err != nil {
log.Panicln(err)