code: func (mgr *Mgr) GetAttributesFromCert(cert *x509.Certificate) (*Attributes, error) {
  	// Get certificate attributes from the certificate if it exists
  	buf, err := getAttributesFromCert(cert)
  	if err != nil {
  		return nil, err
  	}
  	// Unmarshal into attributes object
  	attrs := &Attributes{}
  	if buf != nil {
  		err := json.Unmarshal(buf, attrs)
  		if err != nil {
  			return nil, errors.Wrap(err, "Failed to unmarshal attributes from certificate")
  		}
  	}
  	return attrs, nil
  }
docs: // GetAttributesFromCert gets the attributes from a certificate.