Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
| ... | ... |
@@ -29,7 +29,6 @@ import ( |
| 29 | 29 |
"reflect" |
| 30 | 30 |
"regexp" |
| 31 | 31 |
"runtime" |
| 32 |
- "sort" |
|
| 33 | 32 |
"strconv" |
| 34 | 33 |
"strings" |
| 35 | 34 |
"syscall" |
| ... | ... |
@@ -1279,19 +1278,6 @@ func (cli *DockerCli) printTreeNode(noTrunc bool, image *engine.Env, prefix stri |
| 1279 | 1279 |
} |
| 1280 | 1280 |
} |
| 1281 | 1281 |
|
| 1282 |
-func displayablePorts(ports *engine.Table) string {
|
|
| 1283 |
- result := []string{}
|
|
| 1284 |
- for _, port := range ports.Data {
|
|
| 1285 |
- if port.Get("IP") == "" {
|
|
| 1286 |
- result = append(result, fmt.Sprintf("%d/%s", port.GetInt("PublicPort"), port.Get("Type")))
|
|
| 1287 |
- } else {
|
|
| 1288 |
- result = append(result, fmt.Sprintf("%s:%d->%d/%s", port.Get("IP"), port.GetInt("PublicPort"), port.GetInt("PrivatePort"), port.Get("Type")))
|
|
| 1289 |
- } |
|
| 1290 |
- } |
|
| 1291 |
- sort.Strings(result) |
|
| 1292 |
- return strings.Join(result, ", ") |
|
| 1293 |
-} |
|
| 1294 |
- |
|
| 1295 | 1282 |
func (cli *DockerCli) CmdPs(args ...string) error {
|
| 1296 | 1283 |
cmd := cli.Subcmd("ps", "[OPTIONS]", "List containers")
|
| 1297 | 1284 |
quiet := cmd.Bool([]string{"q", "-quiet"}, false, "Only display numeric IDs")
|