mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
snake_case to camelCase
This commit is contained in:
parent
8bd192fb16
commit
17136d58f2
1 changed files with 5 additions and 5 deletions
10
commands.go
10
commands.go
|
@ -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.")
|
flAll := cmd.Bool("a", false, "Show all containers. Only running containers are shown by default.")
|
||||||
flFull := cmd.Bool("notrunc", false, "Don't truncate output")
|
flFull := cmd.Bool("notrunc", false, "Don't truncate output")
|
||||||
latest := cmd.Bool("l", false, "Show only the latest created container, include non-running ones.")
|
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 {
|
if err := cmd.Parse(args); err != nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if *n_last == -1 && *latest {
|
if *nLast == -1 && *latest {
|
||||||
*n_last = 1
|
*nLast = 1
|
||||||
}
|
}
|
||||||
w := tabwriter.NewWriter(stdout, 12, 1, 3, ' ', 0)
|
w := tabwriter.NewWriter(stdout, 12, 1, 3, ' ', 0)
|
||||||
if !*quiet {
|
if !*quiet {
|
||||||
fmt.Fprintln(w, "ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tCOMMENT")
|
fmt.Fprintln(w, "ID\tIMAGE\tCOMMAND\tCREATED\tSTATUS\tCOMMENT")
|
||||||
}
|
}
|
||||||
for i, container := range srv.runtime.List() {
|
for i, container := range srv.runtime.List() {
|
||||||
if !container.State.Running && !*flAll && *n_last == -1{
|
if !container.State.Running && !*flAll && *nLast == -1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if i == *n_last {
|
if i == *nLast {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
if !*quiet {
|
if !*quiet {
|
||||||
|
|
Loading…
Reference in a new issue