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

doc: fix confusing example in dns.md #11022

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ This category contains only one function: [`dns.lookup()`][]. **Developers
looking to perform name resolution in the same way that other applications on
the same operating system behave should use [`dns.lookup()`][].**

For example, looking up `nodejs.org`.
For example, looking up `iana.org`.

```js
const dns = require('dns');

dns.lookup('nodejs.org', (err, addresses, family) => {
dns.lookup('iana.org', (err, addresses, family) => {
console.log('addresses:', addresses);
});
```
Expand All @@ -28,13 +28,13 @@ functions do not use the same set of configuration files used by
developers who do not want to use the underlying operating system's facilities
for name resolution, and instead want to _always_ perform DNS queries.

Below is an example that resolves `'nodejs.org'` then reverse resolves the IP
Below is an example that resolves `'archive.org'` then reverse resolves the IP
addresses that are returned.

```js
const dns = require('dns');

dns.resolve4('nodejs.org', (err, addresses) => {
dns.resolve4('archive.org', (err, addresses) => {
if (err) throw err;

console.log(`addresses: ${JSON.stringify(addresses)}`);
Expand Down