mirror of
https://github.com/bcicen/ctop.git
synced 2025-12-06 15:16:41 +08:00
move container sort to struct method
This commit is contained in:
@@ -3,7 +3,6 @@ package connector
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@@ -161,7 +160,7 @@ func (cm *Docker) All() (containers container.Containers) {
|
||||
for _, c := range cm.containers {
|
||||
containers = append(containers, c)
|
||||
}
|
||||
sort.Sort(containers)
|
||||
containers.Sort()
|
||||
containers.Filter()
|
||||
cm.lock.Unlock()
|
||||
return containers
|
||||
|
||||
Reference in New Issue
Block a user