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

  1. package main
  2. import (
  3. "time"
  4. )
  5. // Determine if a file with expiry set to "ts" has expired yet
  6. func isTsExpired(ts time.Time) bool {
  7. now := time.Now()
  8. return !ts.IsZero() && now.After(ts)
  9. }
  10. // Determine if the given filename is expired
  11. func isFileExpired(filename string) bool {
  12. exp, _ := metadataGetExpiry(filename)
  13. return isTsExpired(exp)
  14. }