code: func FromEnv(c *Client) error {
  	if dockerCertPath := os.Getenv("DOCKER_CERT_PATH"); dockerCertPath != "" {
  		options := tlsconfig.Options{
  			CAFile:             filepath.Join(dockerCertPath, "ca.pem"),
  			CertFile:           filepath.Join(dockerCertPath, "cert.pem"),
  			KeyFile:            filepath.Join(dockerCertPath, "key.pem"),
  			InsecureSkipVerify: os.Getenv("DOCKER_TLS_VERIFY") == "",
  		}
  		tlsc, err := tlsconfig.Client(options)
  		if err != nil {
  			return err
  		}
  
  		c.client = &http.Client{
  			Transport:     &http.Transport{TLSClientConfig: tlsc},
  			CheckRedirect: CheckRedirect,
  		}
  	}
  
  	if host := os.Getenv("DOCKER_HOST"); host != "" {
  		if err := WithHost(host)(c); err != nil {
  			return err
  		}
  	}
  
  	if version := os.Getenv("DOCKER_API_VERSION"); version != "" {
  		if err := WithVersion(version)(c); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // FromEnv configures the client with values from environment variables.
  //
  // Supported environment variables:
  // DOCKER_HOST to set the url to the docker server.
  // DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest.
  // DOCKER_CERT_PATH to load the TLS certificates from.
  // DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.