From 2d73a273af9e4e7c56c4ea8996507451d543cf1b Mon Sep 17 00:00:00 2001 From: Tobias Klein Date: Sun, 3 Sep 2017 17:06:41 +0200 Subject: [PATCH] saving a variable --- internal/restic/snapshot_policy.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/restic/snapshot_policy.go b/internal/restic/snapshot_policy.go index 156749975..448667943 100644 --- a/internal/restic/snapshot_policy.go +++ b/internal/restic/snapshot_policy.go @@ -90,8 +90,7 @@ func ApplyPolicy(list Snapshots, p ExpirePolicy) (keep, remove Snapshots) { {p.Yearly, y, -1}, } - var nr int - for _, cur := range list { + for nr, cur := range list { nr = nr + 1 var keepSnap bool