fixed kv errors

This commit is contained in:
ston1th 2021-03-07 14:04:06 +01:00
commit ab12dd67d4
4 changed files with 16 additions and 15 deletions

View file

@ -49,7 +49,7 @@ func (c *Cluster) Get(k string) (v []byte, err error) {
return
}
if len(r.Kvs) == 0 {
err = ErrKeyNotFound
err = cluster.ErrKeyNotFound
return
}
v = r.Kvs[0].Value
@ -62,7 +62,7 @@ func (c *Cluster) GetPrefix(k string) (m map[string][]byte, err error) {
return
}
if len(r.Kvs) == 0 {
err = ErrPrefixNotFound
err = cluster.ErrPrefixNotFound
return
}
m = make(map[string][]byte)