Experimental port to CGO-free modernc.org/sqlite, no more WSL

This commit is contained in:
Imbus 2024-03-15 11:02:33 +01:00
parent 2409598c6e
commit fb67825e29
4 changed files with 54 additions and 53 deletions

View file

@ -8,7 +8,7 @@ import (
"ttime/internal/types"
"github.com/jmoiron/sqlx"
_ "github.com/mattn/go-sqlite3"
_ "modernc.org/sqlite"
)
// Interface for the database
@ -74,7 +74,7 @@ WHERE
// DbConnect connects to the database
func DbConnect(dbpath string) Database {
// Open the database
db, err := sqlx.Connect("sqlite3", dbpath)
db, err := sqlx.Connect("sqlite", dbpath)
if err != nil {
panic(err)
}