diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-07-27 00:59:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 00:59:46 +0800 |
commit | 93c0f1715d1ce6e590811a659d20f0e80277ba6a (patch) | |
tree | 39ac2bdba86fd080a717ff2926f615d5d21ee3ce /build/ci.go | |
parent | d9575e92fc6e52ba18267410fcd2426d5a148cbc (diff) | |
parent | 6b232ce3252c6823ac84cd3d2256340f981cd387 (diff) | |
download | dexon-93c0f1715d1ce6e590811a659d20f0e80277ba6a.tar.gz dexon-93c0f1715d1ce6e590811a659d20f0e80277ba6a.tar.zst dexon-93c0f1715d1ce6e590811a659d20f0e80277ba6a.zip |
Merge pull request #17245 from karalabe/azure-deps-fixups
internal, vendor: update Azure blobstore API
Diffstat (limited to 'build/ci.go')
-rw-r--r-- | build/ci.go | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/build/ci.go b/build/ci.go index fd1985fde..2aa85edb4 100644 --- a/build/ci.go +++ b/build/ci.go @@ -1019,23 +1019,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 } |