Commit 96116758 authored by Roc Yu's avatar Roc Yu Committed by Péter Szilágyi

cmd/geth: fix golint issue (#17176)

parent 2e0391ea
...@@ -185,12 +185,12 @@ func resolveMetric(metrics map[string]interface{}, pattern string, path string) ...@@ -185,12 +185,12 @@ func resolveMetric(metrics map[string]interface{}, pattern string, path string)
parts := strings.SplitN(pattern, "/", 2) parts := strings.SplitN(pattern, "/", 2)
if len(parts) > 1 { if len(parts) > 1 {
for _, variation := range strings.Split(parts[0], ",") { 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) utils.Fatalf("Failed to retrieve system metrics: %s", path+variation)
return nil return nil
} else {
results = append(results, resolveMetric(submetrics, parts[1], path+variation+"/")...)
} }
results = append(results, resolveMetric(submetrics, parts[1], path+variation+"/")...)
} }
return results return results
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment