mirror of https://github.com/docker/cli.git
cli/command/system: prettyPrintServerInfo: refactor printing "runtimes"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
1d70f7cdb4
commit
be6f4cd56c
|
@ -253,11 +253,11 @@ func prettyPrintServerInfo(dockerCli command.Cli, info *info) []error {
|
|||
printSwarmInfo(dockerCli, *info.Info)
|
||||
|
||||
if len(info.Runtimes) > 0 {
|
||||
fmt.Fprint(dockerCli.Out(), " Runtimes:")
|
||||
names := make([]string, 0, len(info.Runtimes))
|
||||
for name := range info.Runtimes {
|
||||
fmt.Fprintf(dockerCli.Out(), " %s", name)
|
||||
names = append(names, name)
|
||||
}
|
||||
fmt.Fprint(dockerCli.Out(), "\n")
|
||||
fmt.Fprintln(dockerCli.Out(), " Runtimes:", strings.Join(names, " "))
|
||||
fmt.Fprintln(dockerCli.Out(), " Default Runtime:", info.DefaultRuntime)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue