mirror of
https://github.com/docker/cli.git
synced 2025-08-07 00:42:41 +03:00
Rework docker info
output to be more like docker version
That is, reindent the two sections by one space. While the code was done by hand the `.golden` files had the extra space inserted with emacs' `string-insert-rectangle` macro to (try to) avoid possible manual errors. The docs were edited the same way. Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
@@ -79,8 +79,7 @@ func runInfo(dockerCli command.Cli, opts *infoOptions) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
||||||
fmt.Fprintln(dockerCli.Out(), "Client")
|
fmt.Fprintln(dockerCli.Out(), "Client:")
|
||||||
fmt.Fprintln(dockerCli.Out(), "------")
|
|
||||||
if info.ClientInfo != nil {
|
if info.ClientInfo != nil {
|
||||||
if err := prettyPrintClientInfo(dockerCli, *info.ClientInfo); err != nil {
|
if err := prettyPrintClientInfo(dockerCli, *info.ClientInfo); err != nil {
|
||||||
info.ClientErrors = append(info.ClientErrors, err.Error())
|
info.ClientErrors = append(info.ClientErrors, err.Error())
|
||||||
@@ -91,8 +90,7 @@ func prettyPrintInfo(dockerCli command.Cli, info info) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintln(dockerCli.Out())
|
fmt.Fprintln(dockerCli.Out())
|
||||||
fmt.Fprintln(dockerCli.Out(), "Server")
|
fmt.Fprintln(dockerCli.Out(), "Server:")
|
||||||
fmt.Fprintln(dockerCli.Out(), "------")
|
|
||||||
if info.Info != nil {
|
if info.Info != nil {
|
||||||
for _, err := range prettyPrintServerInfo(dockerCli, *info.Info) {
|
for _, err := range prettyPrintServerInfo(dockerCli, *info.Info) {
|
||||||
info.ServerErrors = append(info.ServerErrors, err.Error())
|
info.ServerErrors = append(info.ServerErrors, err.Error())
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 0
|
Containers: 0
|
||||||
Running: 0
|
Running: 0
|
||||||
Paused: 0
|
Paused: 0
|
||||||
|
@@ -1,7 +1,5 @@
|
|||||||
Client
|
Client:
|
||||||
------
|
|
||||||
ERROR: a client error occurred
|
ERROR: a client error occurred
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
ERROR: a server error occurred
|
ERROR: a server error occurred
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: true
|
Debug Mode: true
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 0
|
Containers: 0
|
||||||
Running: 0
|
Running: 0
|
||||||
Paused: 0
|
Paused: 0
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 0
|
Containers: 0
|
||||||
Running: 0
|
Running: 0
|
||||||
Paused: 0
|
Paused: 0
|
||||||
|
@@ -55,12 +55,10 @@ information about the `devicemapper` storage driver is shown:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker info
|
$ docker info
|
||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 14
|
Containers: 14
|
||||||
Running: 3
|
Running: 3
|
||||||
Paused: 1
|
Paused: 1
|
||||||
@@ -116,12 +114,10 @@ storage driver and a node that is part of a 2-node swarm:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker -D info
|
$ docker -D info
|
||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: true
|
Debug Mode: true
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 14
|
Containers: 14
|
||||||
Running: 3
|
Running: 3
|
||||||
Paused: 1
|
Paused: 1
|
||||||
@@ -217,12 +213,10 @@ Here is a sample output for a daemon running on Windows Server 2016:
|
|||||||
|
|
||||||
```none
|
```none
|
||||||
E:\docker>docker info
|
E:\docker>docker info
|
||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 1
|
Containers: 1
|
||||||
Running: 0
|
Running: 0
|
||||||
Paused: 0
|
Paused: 0
|
||||||
|
@@ -24,12 +24,10 @@ Here is a sample output for a daemon running on Ubuntu, using the overlay2
|
|||||||
storage driver:
|
storage driver:
|
||||||
|
|
||||||
$ docker -D info
|
$ docker -D info
|
||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: true
|
Debug Mode: true
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 14
|
Containers: 14
|
||||||
Running: 3
|
Running: 3
|
||||||
Paused: 1
|
Paused: 1
|
||||||
@@ -114,12 +112,10 @@ using the devicemapper storage driver. As can be seen in the output, additional
|
|||||||
information about the devicemapper storage driver is shown:
|
information about the devicemapper storage driver is shown:
|
||||||
|
|
||||||
$ docker info
|
$ docker info
|
||||||
Client
|
Client:
|
||||||
------
|
|
||||||
Debug Mode: false
|
Debug Mode: false
|
||||||
|
|
||||||
Server
|
Server:
|
||||||
------
|
|
||||||
Containers: 14
|
Containers: 14
|
||||||
Running: 3
|
Running: 3
|
||||||
Paused: 1
|
Paused: 1
|
||||||
|
Reference in New Issue
Block a user