Skip to content

Commit 598d35c

Browse files
vsemozhetbytitaloacasas
authored andcommitted
doc: fix confusing example in dns.md
Currently, the example throws 'Error: getHostByAddr ENOTFOUND' The previous example is edited for consistency. PR-URL: #11022 Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 989d2cd commit 598d35c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/dns.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ This category contains only one function: [`dns.lookup()`][]. **Developers
1010
looking to perform name resolution in the same way that other applications on
1111
the same operating system behave should use [`dns.lookup()`][].**
1212

13-
For example, looking up `nodejs.org`.
13+
For example, looking up `iana.org`.
1414

1515
```js
1616
const dns = require('dns');
1717

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

31-
Below is an example that resolves `'nodejs.org'` then reverse resolves the IP
31+
Below is an example that resolves `'archive.org'` then reverse resolves the IP
3232
addresses that are returned.
3333

3434
```js
3535
const dns = require('dns');
3636

37-
dns.resolve4('nodejs.org', (err, addresses) => {
37+
dns.resolve4('archive.org', (err, addresses) => {
3838
if (err) throw err;
3939

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

0 commit comments

Comments
 (0)