Contains the Concourse pipeline definition for building a line-server container
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.

17 lines
350 B

package main
import (
"time"
)
// Determine if a file with expiry set to "ts" has expired yet
func isTsExpired(ts time.Time) bool {
now := time.Now()
return !ts.IsZero() && now.After(ts)
}
// Determine if the given filename is expired
func isFileExpired(filename string) bool {
exp, _ := metadataGetExpiry(filename)
return isTsExpired(exp)
}