aboutsummaryrefslogtreecommitdiff
path: root/db/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/db/db.go b/db/db.go
index 61f3bb5..c3699d7 100644
--- a/db/db.go
+++ b/db/db.go
@@ -9,6 +9,8 @@ import (
"github.com/mattn/go-sqlite3"
)
+var LibPath = "ext/libsqlite3ext"
+
type (
DB struct {
db *sql.DB
@@ -24,7 +26,7 @@ type (
func Open(filename string) (*DB, error) {
sql.Register("sqlite3_with_extensions", &sqlite3.SQLiteDriver{
ConnectHook: func(conn *sqlite3.SQLiteConn) error {
- return conn.LoadExtension("ext/libsqlite3ext", "sqlite3_spellfix_init")
+ return conn.LoadExtension(LibPath, "sqlite3_spellfix_init")
},
})