mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
Changing a few remaining instances of passing pods around by value. I
avoided changing api.PodList.Items to []*api.Pod.
This commit is contained in:
@@ -187,9 +187,10 @@ func (rm *ReplicationManager) watchControllers(resourceVersion *string) {
|
||||
}
|
||||
|
||||
// Helper function. Also used in pkg/registry/controller, for now.
|
||||
func FilterActivePods(pods []api.Pod) []api.Pod {
|
||||
var result []api.Pod
|
||||
for _, value := range pods {
|
||||
func FilterActivePods(pods []api.Pod) []*api.Pod {
|
||||
var result []*api.Pod
|
||||
for i := range pods {
|
||||
value := &pods[i]
|
||||
if api.PodSucceeded != value.Status.Phase &&
|
||||
api.PodFailed != value.Status.Phase {
|
||||
result = append(result, value)
|
||||
|
Reference in New Issue
Block a user