mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +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))
|
||||
if err != nil {
|
||||
return err
|
||||
if err != nil && err == store.ErrNotFound {
|
||||
return ErrNotFound
|
||||
} else if err != nil {
|
||||
}
|
||||
if len(recs) == 0 {
|
||||
return ErrNotFound
|
||||
|
||||
Reference in New Issue
Block a user