Skip to content

Commit

Permalink
refactor: simplify hasExpired method
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmypw committed Oct 27, 2024
1 parent 7d6f683 commit e966d19
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/storage/memory/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

0 comments on commit e966d19

Please sign in to comment.