From 8adfa895759060f8c3c1ba3f261c9969506a7906 Mon Sep 17 00:00:00 2001 From: Yukine Date: Fri, 5 Feb 2021 02:46:39 +0100 Subject: [PATCH] fix(main): correct snapshots sorting function --- cmd/DigitalOceanSnapshotter/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/DigitalOceanSnapshotter/main.go b/cmd/DigitalOceanSnapshotter/main.go index 41e3c70..bb758fe 100644 --- a/cmd/DigitalOceanSnapshotter/main.go +++ b/cmd/DigitalOceanSnapshotter/main.go @@ -112,7 +112,7 @@ func main() { handleError(ctx, err, true) } - secondTime, err := time.Parse(createdAtFormat, snapshots[firstIndex].Created) + secondTime, err := time.Parse(createdAtFormat, snapshots[secondIndex].Created) if err != nil { handleError(ctx, err, true) }