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 de5e235

Browse filesBrowse files
qheadenMyles Borins
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 0f903bb commit de5e235
Copy full SHA for de5e235

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
@@ -158,7 +158,9 @@ Valid values for `rrtype` are:
158158
* `'NAPTR'` - name authority pointer record
159159

160160
The `callback` function has arguments `(err, addresses)`. When successful,
161-
`addresses` will be an array. The type of each item in `addresses` is
161+
`addresses` will be an array, except when resolving an SOA record which returns
162+
an object structured in the same manner as one returned by the
163+
[`dns.resolveSoa()`][] method. The type of each item in `addresses` is
162164
determined by the record type, and described in the documentation for the
163165
corresponding lookup methods.
164166

@@ -379,6 +381,7 @@ uses. For instance, _they do not use the configuration from `/etc/hosts`_.
379381
[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback
380382
[`dns.resolve()`]: #dns_dns_resolve_hostname_rrtype_callback
381383
[`dns.resolve4()`]: #dns_dns_resolve4_hostname_callback
384+
[`dns.resolveSoa()`]: #dns_dns_resolvesoa_hostname_callback
382385
[`Error`]: errors.html#errors_class_error
383386
[Implementation considerations section]: #dns_implementation_considerations
384387
[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.