Detect problems with connecting to data stores
This commit is contained in:
parent
f26c4862a5
commit
14b14b8f21
1 changed files with 4 additions and 1 deletions
|
@ -64,7 +64,10 @@ func (db *DB) enc(opts *cnf.Options) (err error) {
|
||||||
|
|
||||||
ck := &keys.CK{KV: opts.DB.Base}
|
ck := &keys.CK{KV: opts.DB.Base}
|
||||||
|
|
||||||
kv, _ := db.Get(ck.Encode())
|
kv, err := db.Get(ck.Encode())
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if kv.Exists() == false {
|
if kv.Exists() == false {
|
||||||
err = db.Put(ck.Encode(), []byte("±"))
|
err = db.Put(ck.Encode(), []byte("±"))
|
||||||
|
|
Loading…
Reference in a new issue