mirror of
https://github.com/gofiber/storage.git
synced 2025-12-24 13:29:30 +08:00
Make Get return nil instead of []byte{}
This commit is contained in:
@@ -85,7 +85,7 @@ func (s *Storage) Get(key string) ([]byte, error) {
|
||||
|
||||
// If the expiration time has already passed, then return nil
|
||||
if time.Now().After(time.Unix(exp, 0)) {
|
||||
return []byte{}, nil
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return data, nil
|
||||
|
||||
Reference in New Issue
Block a user