Messed up imports

This commit is contained in:
Michał 2024-05-05 17:53:48 +01:00
parent 677b4277a6
commit 795144aaa0

View file

@ -2,10 +2,9 @@ package database
import (
"database/sql"
"github.com/mattn/go-sqlite3"
"log"
_ "github.com/mattn/go-sqlite3"
"github.com/mattn/go-sqlite3"
)
var Conn *sql.DB
@ -13,12 +12,7 @@ var Conn *sql.DB
func Open() {
var err error
sql.Register("sqlite3_with_extensions",
&sqlite3.SQLiteDriver{
Extensions: []string{
"sqlite3_mod_regexp",
},
})
sql.Register("sqlite3_with_extensions", &sqlite3.SQLiteDriver{})
Conn, err = sql.Open("sqlite3", "tastybites.db?_journal_mode=WAL")
if err != nil {