From 5c99109dd92726fe036f9997c92c5af2ce576c23 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Thu, 14 May 2020 14:38:05 -0400 Subject: [PATCH] Remove unused var The usage of this var was removed in b92f895c233bf8a99ae35361117a90416fea29b5. Found by using staticcheck --- agent/consul/autopilot/autopilot.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/agent/consul/autopilot/autopilot.go b/agent/consul/autopilot/autopilot.go index be0937608e..7e0bbc9ce4 100644 --- a/agent/consul/autopilot/autopilot.go +++ b/agent/consul/autopilot/autopilot.go @@ -420,12 +420,6 @@ func (a *Autopilot) updateClusterHealth() error { // consistent of a sample as possible. We capture the leader's index // here as well so it roughly lines up with the same point in time. targetLastIndex := raftNode.LastIndex() - var fetchList []*ServerInfo - for _, server := range servers { - if parts, ok := serverMap[string(server.ID)]; ok { - fetchList = append(fetchList, parts) - } - } d := time.Now().Add(a.healthInterval / 2) ctx, cancel := context.WithDeadline(context.Background(), d) defer cancel()