save dataStore context field as reference type

This commit is contained in:
Philipp Häfelfinger 2019-03-15 23:54:22 +01:00
parent b917511e95
commit faa7a33f8f
1 changed files with 3 additions and 2 deletions

View File

@ -7,10 +7,11 @@ import (
)
type appContext struct {
// think again if this is a good idea to have such a context!
piwigo *piwigo.PiwigoContext
dataStore *localDataStore
sessionId string
localRootPath string
dataStore localDataStore
}
func (c *appContext) UseMetadataStore(connectionString string) error {
@ -19,7 +20,7 @@ func (c *appContext) UseMetadataStore(connectionString string) error {
}
logrus.Infof("Using SQL Lite data store with '%s'", connectionString)
c.dataStore = localDataStore{}
c.dataStore = &localDataStore{}
err := c.dataStore.Initialize(connectionString)
return err