mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
Use sort.Strings() (gosimple)
This fixes: pkg/tsdb/cloudwatch/metric_find_query.go:257:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032) pkg/tsdb/cloudwatch/metric_find_query.go:286:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032) pkg/tsdb/cloudwatch/metric_find_query.go:315:2: should use sort.Strings(...) instead of sort.Sort(sort.StringSlice(...)) (S1032)
This commit is contained in:
parent
25bb0b5569
commit
ed46efa081
@ -254,7 +254,7 @@ func (e *CloudWatchExecutor) handleGetNamespaces(ctx context.Context, parameters
|
||||
keys = append(keys, strings.Split(customNamespaces, ",")...)
|
||||
}
|
||||
|
||||
sort.Sort(sort.StringSlice(keys))
|
||||
sort.Strings(keys)
|
||||
|
||||
result := make([]suggestData, 0)
|
||||
for _, key := range keys {
|
||||
@ -283,7 +283,7 @@ func (e *CloudWatchExecutor) handleGetMetrics(ctx context.Context, parameters *s
|
||||
return nil, errors.New("Unable to call AWS API")
|
||||
}
|
||||
}
|
||||
sort.Sort(sort.StringSlice(namespaceMetrics))
|
||||
sort.Strings(namespaceMetrics)
|
||||
|
||||
result := make([]suggestData, 0)
|
||||
for _, name := range namespaceMetrics {
|
||||
@ -312,7 +312,7 @@ func (e *CloudWatchExecutor) handleGetDimensions(ctx context.Context, parameters
|
||||
return nil, errors.New("Unable to call AWS API")
|
||||
}
|
||||
}
|
||||
sort.Sort(sort.StringSlice(dimensionValues))
|
||||
sort.Strings(dimensionValues)
|
||||
|
||||
result := make([]suggestData, 0)
|
||||
for _, name := range dimensionValues {
|
||||
|
Loading…
Reference in New Issue
Block a user