code: func ClientConfig(opts Options) (cfg *tls.Config, err error) {
  	var cert *tls.Certificate
  	var pool *x509.CertPool
  
  	if opts.CertFile != "" || opts.KeyFile != "" {
  		if cert, err = CertFromFilePair(opts.CertFile, opts.KeyFile); err != nil {
  			if os.IsNotExist(err) {
  				return nil, fmt.Errorf("could not load x509 key pair (cert: %q, key: %q): %v", opts.CertFile, opts.KeyFile, err)
  			}
  			return nil, fmt.Errorf("could not read x509 key pair (cert: %q, key: %q): %v", opts.CertFile, opts.KeyFile, err)
  		}
  	}
  	if !opts.InsecureSkipVerify && opts.CaCertFile != "" {
  		if pool, err = CertPoolFromFile(opts.CaCertFile); err != nil {
  			return nil, err
  		}
  	}
  	cfg = &tls.Config{
  		InsecureSkipVerify: opts.InsecureSkipVerify,
  		Certificates:       []tls.Certificate{*cert},
  		ServerName:         opts.ServerName,
  		RootCAs:            pool,
  	}
  	return cfg, nil
  }
docs: // ClientConfig returns a TLS configuration for use by a Helm client.