From 14f97cc10af0eea6c376bd745ec944c2b6bea5dc Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 28 Nov 2022 16:16:45 +0100 Subject: [PATCH] cli/command: DockerCli.ServerInfo() load info lazily Signed-off-by: Sebastiaan van Stijn --- cli/command/cli.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/command/cli.go b/cli/command/cli.go index 2ac7a6698b..b4fc151474 100644 --- a/cli/command/cli.go +++ b/cli/command/cli.go @@ -152,7 +152,7 @@ func (cli *DockerCli) ConfigFile() *configfile.ConfigFile { // ServerInfo returns the server version details for the host this client is // connected to func (cli *DockerCli) ServerInfo() ServerInfo { - // TODO(thaJeztah) make ServerInfo() lazily load the info (ping only when needed) + _ = cli.initialize() return cli.serverInfo }