mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Provides capacity for make slice
* Providing capacity for slice decreases memory allocations performed
This commit is contained in:
parent
c241a237f9
commit
dfe29ae7f8
@ -86,7 +86,7 @@ func (l *PodDeleteList) errors() []error {
|
||||
failedPods[msg] = append(failedPods[msg], fmt.Sprintf("%s/%s", i.Pod.Namespace, i.Pod.Name))
|
||||
}
|
||||
}
|
||||
errs := make([]error, 0)
|
||||
errs := make([]error, 0, len(failedPods))
|
||||
for msg, pods := range failedPods {
|
||||
errs = append(errs, fmt.Errorf("cannot delete %s: %s", msg, strings.Join(pods, ", ")))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user