mirror of
https://github.com/gofiber/storage.git
synced 2025-10-02 15:22:19 +08:00
fix ErrNotExist
This commit is contained in:
@@ -109,8 +109,8 @@ func (s *Storage) Get(key string) ([]byte, error) {
|
||||
}
|
||||
|
||||
// If the expiration time has already passed, then return nil
|
||||
if exp <= time.Now().Unix() && exp != 0 {
|
||||
return nil, nil
|
||||
if exp != 0 && exp <= time.Now().Unix() {
|
||||
return nil, ErrNotExist
|
||||
}
|
||||
|
||||
return data, nil
|
||||
|
Reference in New Issue
Block a user