Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a81ff70

Browse filesBrowse files
qheadenevanlucas
authored andcommitted
doc: dns.resolve fix callback argument description
The dns.resolve documentation stated that an array of IP addresses would be returned in the callback. This is true for everything other than the SOA record which returns an object. This fixes that documentation. Fixes: #6506 PR-URL: #7532 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 9797969 commit a81ff70
Copy full SHA for a81ff70

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/dns.md‎

Copy file name to clipboardExpand all lines: doc/api/dns.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ Valid values for `rrtype` are:
174174
* `'NAPTR'` - name authority pointer record
175175

176176
The `callback` function has arguments `(err, addresses)`. When successful,
177-
`addresses` will be an array. The type of each item in `addresses` is
177+
`addresses` will be an array, except when resolving an SOA record which returns
178+
an object structured in the same manner as one returned by the
179+
[`dns.resolveSoa()`][] method. The type of each item in `addresses` is
178180
determined by the record type, and described in the documentation for the
179181
corresponding lookup methods.
180182

@@ -437,6 +439,7 @@ uses. For instance, _they do not use the configuration from `/etc/hosts`_.
437439
[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback
438440
[`dns.resolve()`]: #dns_dns_resolve_hostname_rrtype_callback
439441
[`dns.resolve4()`]: #dns_dns_resolve4_hostname_callback
442+
[`dns.resolveSoa()`]: #dns_dns_resolvesoa_hostname_callback
440443
[`Error`]: errors.html#errors_class_error
441444
[Implementation considerations section]: #dns_implementation_considerations
442445
[supported `getaddrinfo` flags]: #dns_supported_getaddrinfo_flags

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.