Update sqlite3.go

This commit is contained in:
Fenny
2020-11-05 04:23:29 +01:00
parent 95abad1132
commit 567b6de7e7

View File

@@ -108,11 +108,11 @@ func (s *Storage) Get(key string) ([]byte, error) {
if err.Error() != noRows {
return nil, err
}
return nil, nil
return nil, err.Error()
}
// If the expiration time has already passed, then return nil
if exp <= time.Now().Unix() && exp != 0 {
if exp != 0 && exp <= time.Now().Unix() {
return nil, nil
}