diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/db.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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") }, }) |