code: func ParsePublicKeysPEM(keyData []byte) ([]interface{}, error) {
  	var block *pem.Block
  	keys := []interface{}{}
  	for {
  		// read the next block
  		block, keyData = pem.Decode(keyData)
  		if block == nil {
  			break
  		}
  
  		// test block against parsing functions
  		if privateKey, err := parseRSAPrivateKey(block.Bytes); err == nil {
  			keys = append(keys, &privateKey.PublicKey)
  			continue
  		}
  		if publicKey, err := parseRSAPublicKey(block.Bytes); err == nil {
  			keys = append(keys, publicKey)
  			continue
  		}
  		if privateKey, err := parseECPrivateKey(block.Bytes); err == nil {
  			keys = append(keys, &privateKey.PublicKey)
  			continue
  		}
  		if publicKey, err := parseECPublicKey(block.Bytes); err == nil {
  			keys = append(keys, publicKey)
  			continue
  		}
  
  		// tolerate non-key PEM blocks for backwards compatibility
  		// originally, only the first PEM block was parsed and expected to be a key block
  	}
  
  	if len(keys) == 0 {
  		return nil, fmt.Errorf("data does not contain any valid RSA or ECDSA public keys")
  	}
  	return keys, nil
  }
docs: // ParsePublicKeysPEM is a helper function for reading an array of rsa.PublicKey or ecdsa.PublicKey from a PEM-encoded byte array.
  // Reads public keys from both public and private key files.