From b9b3efb09f9281a5859646d2dcf36b5813132efb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 9 Jan 2017 11:16:06 +0100 Subject: all: fix ineffectual assignments and remove uses of crypto.Sha3 go get github.com/gordonklaus/ineffassign ineffassign . --- cmd/geth/monitorcmd.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cmd/geth/monitorcmd.go') diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index 03a124494..c63542f13 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -236,8 +236,9 @@ func expandMetrics(metrics map[string]interface{}, path string) []string { // fetchMetric iterates over the metrics map and retrieves a specific one. func fetchMetric(metrics map[string]interface{}, metric string) float64 { - parts, found := strings.Split(metric, "/"), true + parts := strings.Split(metric, "/") for _, part := range parts[:len(parts)-1] { + var found bool metrics, found = metrics[part].(map[string]interface{}) if !found { return 0 -- cgit v1.2.3