From 397faaf38a67fa39a2d57e742d0f49addab09f2b Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Fri, 2 May 2014 14:15:54 -0700 Subject: [PATCH] Remove unused daemon/sorter.go Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes (github: creack) Upstream-commit: 8913ec4912e529be44b7cc2aaf465b0d9b03ffc9 Component: engine --- components/engine/daemon/sorter.go | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 components/engine/daemon/sorter.go diff --git a/components/engine/daemon/sorter.go b/components/engine/daemon/sorter.go deleted file mode 100644 index c1525aa350..0000000000 --- a/components/engine/daemon/sorter.go +++ /dev/null @@ -1,25 +0,0 @@ -package daemon - -import "sort" - -type containerSorter struct { - containers []*Container - by func(i, j *Container) bool -} - -func (s *containerSorter) Len() int { - return len(s.containers) -} - -func (s *containerSorter) Swap(i, j int) { - s.containers[i], s.containers[j] = s.containers[j], s.containers[i] -} - -func (s *containerSorter) Less(i, j int) bool { - return s.by(s.containers[i], s.containers[j]) -} - -func sortContainers(containers []*Container, predicate func(i, j *Container) bool) { - s := &containerSorter{containers, predicate} - sort.Sort(s) -}