refactor: simplify hasExpired method

This commit is contained in:
James Park-Watt 2024-10-27 05:20:52 +00:00
parent 7d6f683d9d
commit e966d19a3b

View File

@ -102,8 +102,5 @@ func (s *storageMem) ReadAndDestroy(id string) (string, error) {
}
func (m *memStorageSecret) hasExpired() bool {
if !m.Expiry.IsZero() && m.Expiry.Before(time.Now()) {
return true
}
return false
return !m.Expiry.IsZero() && m.Expiry.Before(time.Now())
}