code: func x509Template() x509.Certificate {
  
  	// generate a serial number
  	serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
  	serialNumber, _ := rand.Int(rand.Reader, serialNumberLimit)
  
  	// set expiry to around 10 years
  	expiry := 3650 * 24 * time.Hour
  	// round minute and backdate 5 minutes
  	notBefore := time.Now().Round(time.Minute).Add(-5 * time.Minute).UTC()
  
  	//basic template to use
  	x509 := x509.Certificate{
  		SerialNumber:          serialNumber,
  		NotBefore:             notBefore,
  		NotAfter:              notBefore.Add(expiry).UTC(),
  		BasicConstraintsValid: true,
  	}
  	return x509
  
  }
docs: // default template for X509 certificates