summaryrefslogtreecommitdiff
path: root/src/hub
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2017-07-02 19:51:26 +0200
committerChristian Pointner <equinox@spreadspace.org>2017-07-02 19:51:26 +0200
commit6ce460054a39f2209b64ce15b7c60ea0c1c3fb56 (patch)
tree4c61a44223172f07e2fcc23ee03527b5aae23137 /src/hub
parentconfig type for store (diff)
config options must be exported to usabel by (json|yaml|toml) decoder
Diffstat (limited to 'src/hub')
-rw-r--r--src/hub/src/spreadspace.org/sfive/s5store.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5store.go b/src/hub/src/spreadspace.org/sfive/s5store.go
index d852618..34b04c6 100644
--- a/src/hub/src/spreadspace.org/sfive/s5store.go
+++ b/src/hub/src/spreadspace.org/sfive/s5store.go
@@ -147,30 +147,30 @@ func createDB(dbPath string) (db *bolt.DB, version int, hubUUID string, err erro
}
func NewStore(cfg StoreConfig) (*Store, error) {
- db, version, hubid, err := openDB(cfg.dbPath, cfg.readOnly)
+ db, version, hubid, err := openDB(cfg.DBPath, cfg.ReadOnly)
if err != nil {
return nil, err
}
if db != nil {
- if cfg.readOnly {
+ if cfg.ReadOnly {
s5l.Printf("store: opened read-only (UUID: %s)", hubid)
} else {
s5l.Printf("store: opened (UUID: %s)", hubid)
}
- return &Store{version, hubid, db, cfg.readOnly}, nil
+ return &Store{version, hubid, db, cfg.ReadOnly}, nil
}
- if cfg.readOnly {
+ if cfg.ReadOnly {
return nil, errors.New("store: failed to open, requested read-only mode but store file does not exist.")
}
- db, version, hubid, err = createDB(cfg.dbPath)
+ db, version, hubid, err = createDB(cfg.DBPath)
if err != nil {
return nil, err
}
s5l.Printf("store: initialized (UUID: %s)", hubid)
- return &Store{version, hubid, db, cfg.readOnly}, nil
+ return &Store{version, hubid, db, cfg.ReadOnly}, nil
}
func (st *Store) Close() {