mirror of
https://github.com/Luzifer/ots.git
synced 2025-04-19 06:55:51 -04:00
refactor: simplify hasExpired method
This commit is contained in:
parent
7d6f683d9d
commit
e966d19a3b
@ -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())
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user