// GetDockerVersion gets the cached or api-sourced version of docker engine
GetDockerVersion gets the cached or api-sourced version of docker engine
// GetDockerVersion gets the cached or api - sourced version of docker engine
func GetDockerVersion() (string, error) {
	if DockerVersion != "" {
		return DockerVersion, nil
	}
	var client *docker.Client
	var err error
	if client, err = docker.NewClientFromEnv(); err != nil {
		return "", err
	}
	v, err := client.Version()
	if err != nil {
		return "", err
	}
	DockerVersion = v.Get("Version")
	return DockerVersion, nil
}
func GetDockerVersion ( ) ( string , error ) { if DockerVersion != " " { return DockerVersion , nil } var client * docker . Client var err error if client , err = docker . NewClientFromEnv ( ) ; err != nil { return " " , err } v , err := client . Version ( ) if err != nil { return " " , err } DockerVersion = v . Get ( " " ) return DockerVersion , nil }
GetDockerVersion gets the cached or api-sourced version of docker engine
GetDockerVersion gets the cached or api - sourced version of docker engine