b7fadd9676
This doesn't completely fix #116, but it makes setting up a cron job to do cleanup much more pleasant.
14 lines
236 B
Go
14 lines
236 B
Go
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)
|
|
}
|