mirror of
https://github.com/minio/minio.git
synced 2025-02-09 04:38:09 -05:00
fix: Give accurate cap to slice (#17224)
This commit is contained in:
parent
f037c9b286
commit
ad2ab6eb3e
@ -2677,8 +2677,8 @@ func (c *minioNodeCollector) Collect(ch chan<- prometheus.Metric) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getOrderedLabelValueArrays(labelsWithValue map[string]string) (labels, values []string) {
|
func getOrderedLabelValueArrays(labelsWithValue map[string]string) (labels, values []string) {
|
||||||
labels = make([]string, 0)
|
labels = make([]string, 0, len(labelsWithValue))
|
||||||
values = make([]string, 0)
|
values = make([]string, 0, len(labelsWithValue))
|
||||||
for l, v := range labelsWithValue {
|
for l, v := range labelsWithValue {
|
||||||
labels = append(labels, l)
|
labels = append(labels, l)
|
||||||
values = append(values, v)
|
values = append(values, v)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user