aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/ci.go13
1 files changed, 2 insertions, 11 deletions
diff --git a/build/ci.go b/build/ci.go
index 29b43783c..7d22b5255 100644
--- a/build/ci.go
+++ b/build/ci.go
@@ -1018,23 +1018,14 @@ func doPurge(cmdline []string) {
}
for i := 0; i < len(blobs); i++ {
for j := i + 1; j < len(blobs); j++ {
- iTime, err := time.Parse(time.RFC1123, blobs[i].Properties.LastModified)
- if err != nil {
- log.Fatal(err)
- }
- jTime, err := time.Parse(time.RFC1123, blobs[j].Properties.LastModified)
- if err != nil {
- log.Fatal(err)
- }
- if iTime.After(jTime) {
+ if blobs[i].Properties.LastModified.After(blobs[j].Properties.LastModified) {
blobs[i], blobs[j] = blobs[j], blobs[i]
}
}
}
// Filter out all archives more recent that the given threshold
for i, blob := range blobs {
- timestamp, _ := time.Parse(time.RFC1123, blob.Properties.LastModified)
- if time.Since(timestamp) < time.Duration(*limit)*24*time.Hour {
+ if time.Since(blob.Properties.LastModified) < time.Duration(*limit)*24*time.Hour {
blobs = blobs[:i]
break
}