We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98c5219 commit c0fa5eaCopy full SHA for c0fa5ea
sqlite3.go
@@ -4,6 +4,7 @@
4
// Use of this source code is governed by an MIT-style
5
// license that can be found in the LICENSE file.
6
7
+//go:build cgo
8
// +build cgo
9
10
package sqlite3
@@ -233,8 +234,14 @@ const (
233
234
columnTimestamp string = "timestamp"
235
)
236
237
+// This variable can be replaced with -ldflags like below:
238
+// go build -ldflags="-X 'github.com/mattn/go-sqlite3.driverName=my-sqlite3'"
239
+var driverName = "sqlite3"
240
+
241
func init() {
- sql.Register("sqlite3", &SQLiteDriver{})
242
+ if driverName != "" {
243
+ sql.Register(driverName, &SQLiteDriver{})
244
+ }
245
}
246
247
// Version returns SQLite library version information.
0 commit comments