In the previous example, when generating a self-signed certificate, we already demonstrated the process for creating a signed certificate. In the self-signed example, we just used the same certificate template as the signee and the signer. For this reason, there is not a separate code example. The only difference is that the parent certificate doing the signing or the template to be signed should be swapped out to a different certificate.
This is the function definition for x509.CreateCertificate():
func CreateCertificate(rand io.Reader, template, parent *Certificate, pub, priv interface{}) (cert []byte, err error)
In the self-signed example, the template and parent certificates were the same object. To sign ...