diff options
Diffstat (limited to 'wat/db.go')
-rw-r--r-- | wat/db.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -52,10 +52,10 @@ type WatDb struct { db *gorm.DB } -func NewWatDb() *WatDb { +func NewWatDb(dbpath string) *WatDb { w := WatDb{} var err error - w.db, err = gorm.Open(sqlite.Open("wat.db"), &gorm.Config{}) + w.db, err = gorm.Open(sqlite.Open(dbpath), &gorm.Config{}) if err != nil { panic(err) } |