New storm artist repository, WIP

This commit is contained in:
Deluan
2020-01-10 15:08:23 -05:00
committed by Deluan Quintão
parent 40904b220e
commit aebb960831
11 changed files with 325 additions and 5 deletions
+23
View File
@@ -0,0 +1,23 @@
package storm
import (
"sync"
"github.com/asdine/storm"
)
var (
_dbInstance *storm.DB
once sync.Once
)
func Db() *storm.DB {
once.Do(func() {
instance, err := storm.Open("./storm.db")
if err != nil {
panic(err)
}
_dbInstance = instance
})
return _dbInstance
}