summaryrefslogtreecommitdiff
path: root/system/db/query.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-09-24 00:10:41 -0700
committerSteve Manuel <nilslice@gmail.com>2016-09-24 00:10:41 -0700
commite39696e4be3573bc2c131ccd2f92a07307e1f4ca (patch)
treed0b465259f479eaf96af418f706ad0f1368a2188 /system/db/query.go
parenta454791d5abbba77f6aedb6105edda70d0f52504 (diff)
adding Init func to db instead of native init func so that when cms is called as a CLI, it does not create the db file in the current directory erroneously
Diffstat (limited to 'system/db/query.go')
-rw-r--r--system/db/query.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/system/db/query.go b/system/db/query.go
index 80a3412..480946f 100644
--- a/system/db/query.go
+++ b/system/db/query.go
@@ -18,7 +18,8 @@ import (
var store *bolt.DB
-func init() {
+// Init creates a db connection and initializes db with required info
+func Init() {
var err error
store, err = bolt.Open("store.db", 0666, nil)
if err != nil {