diff options
| author | Shulhan <ms@kilabit.info> | 2021-12-04 00:44:07 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-12-04 00:44:07 +0700 |
| commit | 4070dc72fd494e81fabaaeee16f3804e575f3c62 (patch) | |
| tree | f4bc5917e8d3a0be3b5fa6c3321d96d489f779ed /cmd/resolver | |
| parent | 33b6afc6e94eb01fac34be142b468b0d824b1273 (diff) | |
| download | rescached-4070dc72fd494e81fabaaeee16f3804e575f3c62.tar.xz | |
all: sync with latest share module
This changes update the code based on refactoring on lib/dns package
on share module.
Diffstat (limited to 'cmd/resolver')
| -rw-r--r-- | cmd/resolver/options.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cmd/resolver/options.go b/cmd/resolver/options.go index 56365a4..250c6da 100644 --- a/cmd/resolver/options.go +++ b/cmd/resolver/options.go @@ -16,9 +16,9 @@ import ( // List of error messages. var ( - errQueryName = errors.New("invalid or empty query name") - errQueryType = errors.New("unknown query type") - errQueryClass = errors.New("unknown query class") + errQueryName = errors.New("invalid or empty query name") + errRecordType = errors.New("unknown query type") + errRecordClass = errors.New("unknown query class") ) // List of command line usages. @@ -46,8 +46,8 @@ type options struct { nameserver string insecure bool qname string - qtype uint16 - qclass uint16 + qtype dns.RecordType + qclass dns.RecordClass } func help() { @@ -140,9 +140,9 @@ func (opts *options) parseQType() error { opts.sqtype = strings.ToUpper(opts.sqtype) - opts.qtype, ok = dns.QueryTypes[opts.sqtype] + opts.qtype, ok = dns.RecordTypes[opts.sqtype] if !ok { - return errQueryType + return errRecordType } return nil @@ -153,9 +153,9 @@ func (opts *options) parseQClass() error { opts.sqclass = strings.ToUpper(opts.sqclass) - opts.qclass, ok = dns.QueryClasses[opts.sqclass] + opts.qclass, ok = dns.RecordClasses[opts.sqclass] if !ok { - return errQueryClass + return errRecordClass } return nil |
