all repos — honk @ 66fdb01b3b3e4f8ff67f66d913235e17c232a1ec

my fork of honk

add a version check for sqlite. need 3.20.0 at least.
Ted Unangst tedu@tedunangst.com
Wed, 13 Mar 2024 16:13:24 -0400
commit

66fdb01b3b3e4f8ff67f66d913235e17c232a1ec

parent

d587be9ad08289aadf98acc0828106a399add3bf

1 files changed, 10 insertions(+), 1 deletions(-)

jump to
M util.goutil.go

@@ -45,7 +45,7 @@ "regexp"

"strings" "golang.org/x/crypto/bcrypt" - _ "humungus.tedunangst.com/r/go-sqlite3" + "humungus.tedunangst.com/r/go-sqlite3" "humungus.tedunangst.com/r/webs/httpsig" "humungus.tedunangst.com/r/webs/login" )

@@ -56,6 +56,15 @@ var dbtimeformat = "2006-01-02 15:04:05"

var alreadyopendb *sql.DB var stmtConfig *sql.Stmt + +func init() { + vers, num, _ := sqlite3.Version() + if num < 3020000 { + fmt.Fprintf(os.Stderr, "libsqlite is too old. required: %s found: %s\n", + "3.20.0", vers) + os.Exit(1) + } +} func initdb() { blobdbname := dataDir + "/blob.db"