cmd/geth: fix golint issue (#17176)

This commit is contained in:
Roc Yu 2018-07-16 15:33:58 +08:00 committed by Péter Szilágyi
parent 2e0391ea84
commit 96116758d2
1 changed files with 3 additions and 3 deletions

View File

@ -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
}