diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-04-20 21:07:51 +0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2024-04-20 21:15:45 +0200 |
commit | a26f850c2372718d2b69d6b258d686c68ddba5ff (patch) | |
tree | ca45aa4a57ded8381d404804c4b07255fc01b563 /db | |
parent | 07f7f50fd5ff577896314984d1f365631be093bc (diff) | |
download | dict-a26f850c2372718d2b69d6b258d686c68ddba5ff.tar.gz dict-a26f850c2372718d2b69d6b258d686c68ddba5ff.tar.bz2 dict-a26f850c2372718d2b69d6b258d686c68ddba5ff.zip |
ref: Better doc and makefile
It adds README explaining how to compile and install.
Makefile allows to install dict system wide.
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") }, }) |