From cfa3746ae2a219d5157f49dcc605513c59f43552 Mon Sep 17 00:00:00 2001 From: Roc Yu Date: Sun, 15 Jul 2018 17:54:13 +0800 Subject: [PATCH] cmd/geth: Fix golint issue due to have else with if block that ends with return --- cmd/geth/monitorcmd.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index cd19caa276..e4ba96a7a6 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -185,12 +185,12 @@ func resolveMetric(metrics map[string]interface{}, pattern string, path string) parts := strings.SplitN(pattern, "/", 2) if len(parts) > 1 { for _, variation := range strings.Split(parts[0], ",") { - if submetrics, ok := metrics[variation].(map[string]interface{}); !ok { + submetrics, ok := metrics[variation].(map[string]interface{}) + if !ok { utils.Fatalf("Failed to retrieve system metrics: %s", path+variation) return nil - } else { - results = append(results, resolveMetric(submetrics, parts[1], path+variation+"/")...) } + results = append(results, resolveMetric(submetrics, parts[1], path+variation+"/")...) } return results }