Explorar o código

Remove container.When method
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Michael Crosby %!s(int64=11) %!d(string=hai) anos
pai
achega
71b241cbfe
Modificáronse 2 ficheiros con 1 adicións e 5 borrados
  1. 0 4
      runtime/container.go
  2. 1 1
      runtime/history.go

+ 0 - 4
runtime/container.go

@@ -112,10 +112,6 @@ func (container *Container) Inject(file io.Reader, pth string) error {
 	return nil
 	return nil
 }
 }
 
 
-func (container *Container) When() time.Time {
-	return container.Created
-}
-
 func (container *Container) FromDisk() error {
 func (container *Container) FromDisk() error {
 	data, err := ioutil.ReadFile(container.jsonPath())
 	data, err := ioutil.ReadFile(container.jsonPath())
 	if err != nil {
 	if err != nil {

+ 1 - 1
runtime/history.go

@@ -14,7 +14,7 @@ func (history *History) Len() int {
 
 
 func (history *History) Less(i, j int) bool {
 func (history *History) Less(i, j int) bool {
 	containers := *history
 	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) {
 func (history *History) Swap(i, j int) {