move container sort to struct method

This commit is contained in:
Bradley Cicenas
2017-06-12 13:40:52 +00:00
parent aff6943d07
commit a48a9031cc
4 changed files with 5 additions and 6 deletions

View File

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