🎑 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

@@ -127,6 +127,11 @@ func (s *Storage) Get(key string) ([]byte, error) {
//
// document will be remove automatically if exp is set, based on MongoDB TTL Indexes
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
}
filter := bson.M{"key": key}
item := s.acquireItem()
item.Key = key