snake_case to camelCase
Upstream-commit: 17136d58f29fdd921d41ebd7c67c73bd4078b023 Component: engine
This commit is contained in:
@@ -648,22 +648,22 @@ func (srv *Server) CmdPs(stdin io.ReadCloser, stdout io.Writer, args ...string)
|
||||
flAll := cmd.Bool("a", false, "Show all containers. Only running containers are shown by default.")
|
||||
flFull := cmd.Bool("notrunc", false, "Don't truncate output")
|
||||
latest := cmd.Bool("l", false, "Show only the latest created container, include non-running ones.")
|
||||
n_last := cmd.Int("n", -1, "Show n last created containers, include non-running ones.")
|
||||
nLast := cmd.Int("n", -1, "Show n last created containers, include non-running ones.")
|
||||
if err := cmd.Parse(args); err != nil {
|
||||
return nil
|
||||
}
|
||||
if *n_last == -1 && *latest {
|
||||
*n_last = 1
|
||||
if *nLast == -1 && *latest {
|
||||
*nLast = 1
|
||||
}
|
||||
w := tabwriter.NewWriter(stdout, 12, 1, 3, ' ', 0)
|
||||
if !*quiet {
|
||||
fmt.Fprintln(w, "ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tCOMMENT")
|
||||
}
|
||||
for i, container := range srv.runtime.List() {
|
||||
if !container.State.Running && !*flAll && *n_last == -1{
|
||||
if !container.State.Running && !*flAll && *nLast == -1 {
|
||||
continue
|
||||
}
|
||||
if i == *n_last {
|
||||
if i == *nLast {
|
||||
break
|
||||
}
|
||||
if !*quiet {
|
||||
|
||||
Reference in New Issue
Block a user