code: func parseRSAPublicKey(data []byte) (*rsa.PublicKey, error) {
  	var err error
  
  	// Parse the key
  	var parsedKey interface{}
  	if parsedKey, err = x509.ParsePKIXPublicKey(data); err != nil {
  		if cert, err := x509.ParseCertificate(data); err == nil {
  			parsedKey = cert.PublicKey
  		} else {
  			return nil, err
  		}
  	}
  
  	// Test if parsed key is an RSA Public Key
  	var pubKey *rsa.PublicKey
  	var ok bool
  	if pubKey, ok = parsedKey.(*rsa.PublicKey); !ok {
  		return nil, fmt.Errorf("data doesn't contain valid RSA Public Key")
  	}
  
  	return pubKey, nil
  }
docs: // parseRSAPublicKey parses a single RSA public key from the provided data