summaryrefslogtreecommitdiff
path: root/system/db/addon.go
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2017-01-10 12:38:40 -0800
committerSteve Manuel <nilslice@gmail.com>2017-01-10 12:38:40 -0800
commit4415d2e915fda066a4ee092dc51311edc2e74100 (patch)
treed6dce722b9397ec868ce54d7cb084571ce01ad15 /system/db/addon.go
parent820c24f827bf01cc44d22be492d407372c1a416a (diff)
adding db open back to Init and calling Init from other files init()
Diffstat (limited to 'system/db/addon.go')
-rw-r--r--system/db/addon.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/db/addon.go b/system/db/addon.go
index 8607119..b5c4929 100644
--- a/system/db/addon.go
+++ b/system/db/addon.go
@@ -15,6 +15,12 @@ var (
ErrNoAddonExists = errors.New("No addon exists.")
)
+func init() {
+ if store == nil {
+ Init()
+ }
+}
+
// Addon looks for an addon by its addon_reverse_dns as the key and returns
// the url.Values representation of an addon
func Addon(key string) (url.Values, error) {