aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoc Yu <rociiu0112@gmail.com>2018-07-16 15:33:58 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-07-16 15:33:58 +0800
commit96116758d22ddbff4dbef2050d6b63a7b74502d8 (patch)
treea6e7ccc484de1bf9ee643cc643eab65132d21eea
parent2e0391ea84ba02b6a8462209f55019f07d01bdd4 (diff)
downloadgo-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar.gz
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar.bz2
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar.lz
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar.xz
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.tar.zst
go-tangerine-96116758d22ddbff4dbef2050d6b63a7b74502d8.zip
cmd/geth: fix golint issue (#17176)
-rw-r--r--cmd/geth/monitorcmd.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go
index cd19caa27..e4ba96a7a 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
}