code: func EncodeCertificatesPEM(certs []*x509.Certificate) []byte {
  	var buffer bytes.Buffer
  	for _, cert := range certs {
  		pem.Encode(&buffer, &pem.Block{
  			Type:  "CERTIFICATE",
  			Bytes: cert.Raw,
  		})
  	}
  
  	return buffer.Bytes()
  }
docs: // EncodeCertificatesPEM encodes a number of x509 certificates to PEM