🎑 update tests

This commit is contained in:
Fenny
2020-11-05 05:36:27 +01:00
parent 504e8c31f8
commit 8440b5e3c0
8 changed files with 29 additions and 0 deletions

View File

@@ -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
}