mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 07:41:25 +00:00
fix error
This commit is contained in:
5
pkg/cache/cache.go
vendored
5
pkg/cache/cache.go
vendored
@@ -101,8 +101,9 @@ func (c *cache) Get(key string, val interface{}) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
recs, err := c.Store.Read(c.Key(key), store.ReadLimit(1))
|
recs, err := c.Store.Read(c.Key(key), store.ReadLimit(1))
|
||||||
if err != nil {
|
if err != nil && err == store.ErrNotFound {
|
||||||
return err
|
return ErrNotFound
|
||||||
|
} else if err != nil {
|
||||||
}
|
}
|
||||||
if len(recs) == 0 {
|
if len(recs) == 0 {
|
||||||
return ErrNotFound
|
return ErrNotFound
|
||||||
|
|||||||
Reference in New Issue
Block a user