From be463d8986bbb73d45413b604432c93001951d3f Mon Sep 17 00:00:00 2001 From: Gert-Jan Timmer Date: Wed, 20 Jun 2018 16:48:54 +0200 Subject: [PATCH] Add Extension(s) loading --- _driver/sqlite3_load_extension.go => driver/extensions.go | 3 +-- .../extensions_disabled.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename _driver/sqlite3_load_extension.go => driver/extensions.go (96%) rename _driver/sqlite3_load_extension_omit.go => driver/extensions_disabled.go (89%) diff --git a/_driver/sqlite3_load_extension.go b/driver/extensions.go similarity index 96% rename from _driver/sqlite3_load_extension.go rename to driver/extensions.go index 36e72b8..a61581f 100644 --- a/_driver/sqlite3_load_extension.go +++ b/driver/extensions.go @@ -3,7 +3,7 @@ // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. -// +build !sqlite_omit_load_extension +// +build !sqlite_omit_load_extension !sqlite_disable_extensions package sqlite3 @@ -38,7 +38,6 @@ func (c *SQLiteConn) loadExtensions(extensions []string) error { if rv != C.SQLITE_OK { // Disable Extension Loading rv = C.sqlite3_enable_load_extension(c.db, 0) - fmt.Printf("%d\n", rv) if rv != C.SQLITE_OK { return errors.New("Failed to disable extension loading") } diff --git a/_driver/sqlite3_load_extension_omit.go b/driver/extensions_disabled.go similarity index 89% rename from _driver/sqlite3_load_extension_omit.go rename to driver/extensions_disabled.go index 7ea3294..4c34359 100644 --- a/_driver/sqlite3_load_extension_omit.go +++ b/driver/extensions_disabled.go @@ -3,7 +3,7 @@ // Use of this source code is governed by an MIT-style // license that can be found in the LICENSE file. -// +build sqlite_omit_load_extension +// +build sqlite_omit_load_extension sqlite_disable_extensions package sqlite3