You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: runtime.go
    path of file: ./repos/lastbackend/pkg/runtime/cii/docker
    
    the code of the file until where you have to start completion: //
// Last.Backend LLC CONFIDENTIAL
// __
    
func New(cfg Config) (*Runtime, error) {

	var (
		err           error
		r             = new(Runtime)
		clientOptions = make([]client.Opt, 0)
	)

	host := client.DefaultDockerHost
	if len(cfg.Host) != 0 {
		host = cfg.Host
	}
	clientOptions = append(clientOptions, client.WithHost(host))

	version := api.DefaultVersion
	if len(cfg.Version) != 0 {
		version = cfg.Version
	}

	clientOptions = append(clientOptions, client.WithVersion(version))

	if cfg.TLS != nil {

		if len(cfg.TLS.CAPath) == 0 {
			return nil, errors.New("path to ca file not set")
		}
		if len(cfg.TLS.CertPath) == 0 {
			return nil, errors.New("path to cert file not set")
		}
		if len(cfg.TLS.KeyPath) == 0 {
			return nil, errors.New("path to key file not set")
		}

		caPath := cfg.TLS.CAPath
		certPath := cfg.TLS.CertPath
		keyPath := cfg.TLS.KeyPath

		clientOptions = append(clientOptions, client.WithTLSClientConfig(caPath, certPath, keyPath))
	}

	r.client, err = client.NewClientWithOpts(clientOptions...)
	if err != nil {
		return nil, err
	}

	return r, nil
}