Skip to content

Commit

Permalink
doc: fix types and description for dns.resolveTxt
Browse files Browse the repository at this point in the history
Backport-PR-URL: #16316
PR-URL: #15472
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
tniessen authored and MylesBorins committed Oct 26, 2017
1 parent 6e06d0e commit 37b9372
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doc/api/dns.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ records. The type and structure of individual results varies based on `rrtype`:
| `'PTR'` | pointer records | {string} | [`dns.resolvePtr()`][] |
| `'SOA'` | start of authority records | {Object} | [`dns.resolveSoa()`][] |
| `'SRV'` | service records | {Object} | [`dns.resolveSrv()`][] |
| `'TXT'` | text records | {string} | [`dns.resolveTxt()`][] |
| `'TXT'` | text records | {string[]} | [`dns.resolveTxt()`][] |

On error, `err` is an [`Error`][] object, where `err.code` is one of the
[DNS error codes](#dns_error_codes).
Expand Down Expand Up @@ -359,10 +359,14 @@ be an array of strings containing the reply records.
<!-- YAML
added: v0.1.27
-->
- `hostname` {string}
- `callback` {Function}
- `err` {Error}
- `records` {string[][]}

Uses the DNS protocol to resolve text queries (`TXT` records) for the
`hostname`. The `addresses` argument passed to the `callback` function is
is a two-dimensional array of the text records available for `hostname` (e.g.,
`hostname`. The `records` argument passed to the `callback` function is a
two-dimensional array of the text records available for `hostname` (e.g.,
`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
one record. Depending on the use case, these could be either joined together or
treated separately.
Expand Down

0 comments on commit 37b9372

Please sign in to comment.