code: func NewCSR(cfg certutil.Config, key crypto.Signer) (*x509.CertificateRequest, error) {
  	template := &x509.CertificateRequest{
  		Subject: pkix.Name{
  			CommonName:   cfg.CommonName,
  			Organization: cfg.Organization,
  		},
  		DNSNames:    cfg.AltNames.DNSNames,
  		IPAddresses: cfg.AltNames.IPs,
  	}
  
  	csrBytes, err := x509.CreateCertificateRequest(cryptorand.Reader, template, key)
  
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to create a CSR")
  	}
  
  	return x509.ParseCertificateRequest(csrBytes)
  }
docs: // NewCSR creates a new CSR