summaryrefslogtreecommitdiff
path: root/vendor/github.com/ncruces/go-sqlite3/registry.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/ncruces/go-sqlite3/registry.go')
-rw-r--r--vendor/github.com/ncruces/go-sqlite3/registry.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/vendor/github.com/ncruces/go-sqlite3/registry.go b/vendor/github.com/ncruces/go-sqlite3/registry.go
deleted file mode 100644
index 043d69eeb..000000000
--- a/vendor/github.com/ncruces/go-sqlite3/registry.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package sqlite3
-
-import "sync"
-
-var (
- // +checklocks:extRegistryMtx
- extRegistry []func(*Conn) error
- extRegistryMtx sync.RWMutex
-)
-
-// AutoExtension causes the entryPoint function to be invoked
-// for each new database connection that is created.
-//
-// https://sqlite.org/c3ref/auto_extension.html
-func AutoExtension(entryPoint func(*Conn) error) {
- extRegistryMtx.Lock()
- defer extRegistryMtx.Unlock()
- extRegistry = append(extRegistry, entryPoint)
-}
-
-func initExtensions(c *Conn) error {
- extRegistryMtx.RLock()
- defer extRegistryMtx.RUnlock()
- for _, f := range extRegistry {
- if err := f(c); err != nil {
- return err
- }
- }
- return nil
-}