Explorar o código

Merge pull request #4733 from vieux/3729_time_exit

add time since exit in docker ps
Michael Crosby %!s(int64=11) %!d(string=hai) anos
pai
achega
1e56ec8b67
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      runtime/state.go

+ 1 - 1
runtime/state.go

@@ -28,7 +28,7 @@ func (s *State) String() string {
 		}
 		return fmt.Sprintf("Up %s", utils.HumanDuration(time.Now().UTC().Sub(s.StartedAt)))
 	}
-	return fmt.Sprintf("Exit %d", s.ExitCode)
+	return fmt.Sprintf("Exited (%d) %s ago", s.ExitCode, utils.HumanDuration(time.Now().UTC().Sub(s.FinishedAt)))
 }
 
 func (s *State) IsRunning() bool {