From 01156e58eb138200eea84b4ce3f86b251b991a19 Mon Sep 17 00:00:00 2001
From: Shane Howearth <Shane.h.1@gmail.com>
Date: Thu, 26 Sep 2019 13:37:32 +1000
Subject: [PATCH] Remove unnecessary initialisation of last

last was initialised twice (creating a shadow), the second time inside
a case statement. The second initialisation is removed, keeping the use
of last aligned to the isame style as its use other parts of the case
statement.
---
 client/lib/util.go | 1 -
 1 file changed, 1 deletion(-)

diff --git a/client/lib/util.go b/client/lib/util.go
index f385279a..f93bcbee 100644
--- a/client/lib/util.go
+++ b/client/lib/util.go
@@ -54,7 +54,6 @@ func (b *BytesSyncLogger) Log() {
 		case amount = <-b.OutboundChan:
 			b.Outbound += amount
 			b.OutEvents++
-			last := time.Now()
 			if time.Since(last) > time.Second*LogTimeInterval {
 				last = time.Now()
 				output()
-- 
GitLab