From 757f2fd1a015318fbfac52a2825c66758ce334ba Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Mon, 14 Apr 2014 06:54:40 +0000 Subject: [PATCH] Remove container.When method Docker-DCO-1.1-Signed-off-by: Michael Crosby (github: crosbymichael) Upstream-commit: 71b241cbfe5b0100ee2ee0fd0e651beccd965746 Component: engine --- components/engine/runtime/container.go | 4 ---- components/engine/runtime/history.go | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/components/engine/runtime/container.go b/components/engine/runtime/container.go index a9b81819d6..a2b75d2394 100644 --- a/components/engine/runtime/container.go +++ b/components/engine/runtime/container.go @@ -112,10 +112,6 @@ func (container *Container) Inject(file io.Reader, pth string) error { return nil } -func (container *Container) When() time.Time { - return container.Created -} - func (container *Container) FromDisk() error { data, err := ioutil.ReadFile(container.jsonPath()) if err != nil { diff --git a/components/engine/runtime/history.go b/components/engine/runtime/history.go index 835ac9c11e..bce3d7005a 100644 --- a/components/engine/runtime/history.go +++ b/components/engine/runtime/history.go @@ -14,7 +14,7 @@ func (history *History) Len() int { func (history *History) Less(i, j int) bool { containers := *history - return containers[j].When().Before(containers[i].When()) + return containers[j].Created.Before(containers[i].Created) } func (history *History) Swap(i, j int) {