code: func GenCertificate() (cert tls.Certificate, err error) {
  	rawCert, rawKey, err := generateKeyPair()
  	if err != nil {
  		return
  	}
  	return tls.X509KeyPair(rawCert, rawKey)
  }
docs: // GenCertificate generates a random TLS certificate.