You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
236 B
13 lines
236 B
package expiry
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
var NeverExpire = time.Unix(0, 0)
|
|
|
|
// Determine if a file with expiry set to "ts" has expired yet
|
|
func IsTsExpired(ts time.Time) bool {
|
|
now := time.Now()
|
|
return ts != NeverExpire && now.After(ts)
|
|
}
|