Instance Store properly.

Interface by default, then the custom one.
main
Óscar M. Lage 2022-03-18 23:36:26 +01:00
parent 4f7b3aa42a
commit aafe5c6249
1 changed files with 5 additions and 3 deletions

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)