Remove expired() since it's no longer used (because of the inlining)
This commit is contained in:
parent
8084bd02b5
commit
1924ec3baf
8
cache.go
8
cache.go
@ -17,16 +17,8 @@ type Item struct {
|
|||||||
Expiration int64
|
Expiration int64
|
||||||
}
|
}
|
||||||
|
|
||||||
func (item Item) expired(now int64) bool {
|
|
||||||
if item.Expiration == 0 {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return now > item.Expiration
|
|
||||||
}
|
|
||||||
|
|
||||||
// Returns true if the item has expired.
|
// Returns true if the item has expired.
|
||||||
func (item Item) Expired() bool {
|
func (item Item) Expired() bool {
|
||||||
// "Inlining" of expired
|
|
||||||
if item.Expiration == 0 {
|
if item.Expiration == 0 {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user