summary refs log tree commit diff stats
path: root/storage/sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'storage/sqlite3')
-rw-r--r--storage/sqlite3/db.go13
-rw-r--r--storage/sqlite3/init.go8
2 files changed, 13 insertions, 8 deletions
diff --git a/storage/sqlite3/db.go b/storage/sqlite3/db.go
new file mode 100644
index 0000000..e949bba
--- /dev/null
+++ b/storage/sqlite3/db.go
@@ -0,0 +1,13 @@
+package sqlite3
+
+import (
+	"database/sql"
+	"sync"
+)
+
+// DB holds the database connection, mutex & path.
+type DB struct {
+	Path string
+	Mu   *sync.RWMutex
+	Conn *sql.DB
+}
diff --git a/storage/sqlite3/init.go b/storage/sqlite3/init.go
index cb573a2..01ffb9e 100644
--- a/storage/sqlite3/init.go
+++ b/storage/sqlite3/init.go
@@ -4,18 +4,10 @@ import (
 	"database/sql"
 	"log"
 	"os"
-	"sync"
 
 	_ "github.com/mattn/go-sqlite3"
 )
 
-// DB holds the database connection, mutex & path.
-type DB struct {
-	Path string
-	Mu   *sync.RWMutex
-	Conn *sql.DB
-}
-
 // initErr will log the error and close the database connection if
 // necessary.
 func initErr(db *DB, err error) {