code: func (mgr *Mgr) AddAttributesToCert(attrs *Attributes, cert *x509.Certificate) error {
  	buf, err := json.Marshal(attrs)
  	if err != nil {
  		return errors.Wrap(err, "Failed to marshal attributes")
  	}
  	ext := pkix.Extension{
  		Id:       AttrOID,
  		Critical: false,
  		Value:    buf,
  	}
  	cert.Extensions = append(cert.Extensions, ext)
  	return nil
  }
docs: // AddAttributesToCert adds public attribute info to an X509 certificate.