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:
Ian Campbell 2019-01-25 13:10:59 +00:00
parent c9e60ae17a
commit bcb06b5f58
7 changed files with 554 additions and 574 deletions

View File

@ -79,8 +79,7 @@ func runInfo(dockerCli command.Cli, opts *infoOptions) error {
}
func prettyPrintInfo(dockerCli command.Cli, info info) error {
fmt.Fprintln(dockerCli.Out(), "Client")
fmt.Fprintln(dockerCli.Out(), "------")
fmt.Fprintln(dockerCli.Out(), "Client:")
if info.ClientInfo != nil {
if err := prettyPrintClientInfo(dockerCli, *info.ClientInfo); err != nil {
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(), "Server")
fmt.Fprintln(dockerCli.Out(), "------")
fmt.Fprintln(dockerCli.Out(), "Server:")
if info.Info != nil {
for _, err := range prettyPrintServerInfo(dockerCli, *info.Info) {
info.ServerErrors = append(info.ServerErrors, err.Error())

View File

@ -1,9 +1,7 @@
Client
------
Client:
Debug Mode: false
Server
------
Server:
Containers: 0
Running: 0
Paused: 0

View File

@ -1,7 +1,5 @@
Client
------
Client:
ERROR: a client error occurred
Server
------
Server:
ERROR: a server error occurred

View File

@ -1,9 +1,7 @@
Client
------
Client:
Debug Mode: true
Server
------
Server:
Containers: 0
Running: 0
Paused: 0

View File

@ -1,9 +1,7 @@
Client
------
Client:
Debug Mode: false
Server
------
Server:
Containers: 0
Running: 0
Paused: 0

View File

@ -55,12 +55,10 @@ information about the `devicemapper` storage driver is shown:
```bash
$ docker info
Client
------
Client:
Debug Mode: false
Server
------
Server:
Containers: 14
Running: 3
Paused: 1
@ -116,12 +114,10 @@ storage driver and a node that is part of a 2-node swarm:
```bash
$ docker -D info
Client
------
Client:
Debug Mode: true
Server
------
Server:
Containers: 14
Running: 3
Paused: 1
@ -217,12 +213,10 @@ Here is a sample output for a daemon running on Windows Server 2016:
```none
E:\docker>docker info
Client
------
Client:
Debug Mode: false
Server
------
Server:
Containers: 1
Running: 0
Paused: 0

View File

@ -24,12 +24,10 @@ Here is a sample output for a daemon running on Ubuntu, using the overlay2
storage driver:
$ docker -D info
Client
------
Client:
Debug Mode: true
Server
------
Server:
Containers: 14
Running: 3
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:
$ docker info
Client
------
Client:
Debug Mode: false
Server
------
Server:
Containers: 14
Running: 3
Paused: 1