summaryrefslogtreecommitdiff
path: root/model/database.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/database.go')
-rw-r--r--model/database.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/model/database.go b/model/database.go
index 36190ff..d816163 100644
--- a/model/database.go
+++ b/model/database.go
@@ -4,7 +4,6 @@ import (
"database/sql"
"embed"
"log"
- "path/filepath"
_ "github.com/mattn/go-sqlite3"
)
@@ -23,12 +22,10 @@ func GetSql(code string) (string, error) {
return string(query), nil
}
-func InitDatabase(storage string) {
+func InitDatabase(path string) {
var err error
- fn := filepath.Join(storage, "ceres.sqlite3")
-
- db, err = sql.Open("sqlite3", fn)
+ db, err = sql.Open("sqlite3", path)
if err != nil {
log.Fatal(err)
}