From 8913ec4912e529be44b7cc2aaf465b0d9b03ffc9 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) --- daemon/sorter.go | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 daemon/sorter.go diff --git a/daemon/sorter.go b/daemon/sorter.go deleted file mode 100644 index c1525aa350..0000000000 --- a/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) -}