Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed key lookup example on README.md #790

Merged
merged 2 commits into from Nov 1, 2018
Merged

Conversation

nickmi
Copy link

@nickmi nickmi commented Oct 23, 2018

Related to issue #788, i just changed the example on the README.md

README.md Outdated
@@ -416,7 +416,7 @@ var options = {
query: 'alice@example.com'
};

hkp.lookup(options).then(function(key) {
hkp.lookup(options).then( async function(key) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do recommend to use either .then or async/await, but not both - it gets messy. Since we do most examples with async/await, the following would be better:

let armoredPubkey = await hkp.lookup(options);
var pubkey = await openpgp.key.readArmored(armoredPubkey);

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback, made the changes as recommended

@sanjanarajan sanjanarajan merged commit 09def12 into openpgpjs:master Nov 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants