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:
Karsten Weiss 2018-04-16 20:45:59 +02:00
parent 25bb0b5569
commit ed46efa081

View File

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