mirror of
https://github.com/gofiber/storage.git
synced 2025-10-04 08:16:36 +08:00
🎑 update tests
This commit is contained in:
@@ -138,6 +138,10 @@ func (s *Storage) Get(key string) ([]byte, error) {
|
||||
|
||||
// Set key with value
|
||||
func (s *Storage) Set(key string, val []byte, exp time.Duration) error {
|
||||
// Ain't Nobody Got Time For That
|
||||
if len(val) <= 0 {
|
||||
return nil
|
||||
}
|
||||
_, err := s.db.Exec(s.sqlInsert, key, utils.UnsafeString(val), time.Now().Add(exp).Unix())
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user