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