diff options
Diffstat (limited to 'cmd/geth')
-rw-r--r-- | cmd/geth/monitorcmd.go | 6 | ||||
-rw-r--r-- | cmd/geth/usage.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/cmd/geth/monitorcmd.go b/cmd/geth/monitorcmd.go index e4ba96a7a..34e090e1e 100644 --- a/cmd/geth/monitorcmd.go +++ b/cmd/geth/monitorcmd.go @@ -169,7 +169,7 @@ func retrieveMetrics(client *rpc.Client) (map[string]interface{}, error) { // resolveMetrics takes a list of input metric patterns, and resolves each to one // or more canonical metric names. func resolveMetrics(metrics map[string]interface{}, patterns []string) []string { - res := []string{} + var res []string for _, pattern := range patterns { res = append(res, resolveMetric(metrics, pattern, "")...) } @@ -179,7 +179,7 @@ func resolveMetrics(metrics map[string]interface{}, patterns []string) []string // resolveMetrics takes a single of input metric pattern, and resolves it to one // or more canonical metric names. func resolveMetric(metrics map[string]interface{}, pattern string, path string) []string { - results := []string{} + var results []string // If a nested metric was requested, recurse optionally branching (via comma) parts := strings.SplitN(pattern, "/", 2) @@ -215,7 +215,7 @@ func resolveMetric(metrics map[string]interface{}, pattern string, path string) // expandMetrics expands the entire tree of metrics into a flat list of paths. func expandMetrics(metrics map[string]interface{}, path string) []string { // Iterate over all fields and expand individually - list := []string{} + var list []string for name, metric := range metrics { switch metric := metric.(type) { case float64: diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 0b5c6fd90..a26203716 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -308,7 +308,7 @@ func init() { categorized[flag.String()] = struct{}{} } } - uncategorized := []cli.Flag{} + var uncategorized []cli.Flag for _, flag := range data.(*cli.App).Flags { if _, ok := categorized[flag.String()]; !ok { if strings.HasPrefix(flag.GetName(), "dashboard") { |