From a26f850c2372718d2b69d6b258d686c68ddba5ff Mon Sep 17 00:00:00 2001 From: "Gabriel A. Giovanini" Date: Sat, 20 Apr 2024 21:07:51 +0200 Subject: ref: Better doc and makefile It adds README explaining how to compile and install. Makefile allows to install dict system wide. --- db/db.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'db/db.go') 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") }, }) -- cgit v1.2.3