diff options
| author | Shulhan <ms@kilabit.info> | 2021-11-14 17:46:02 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-11-14 17:52:52 +0700 |
| commit | 3f02602db8cfe6fbb09d550ac723fc251eb81f1d (patch) | |
| tree | e0e15a163ee22aa5cce3d9e7e45d2dc5cad4a658 /lib/dns/server_example_test.go | |
| parent | 207a7fa24fe58619628e98a9298a3f877ed16146 (diff) | |
| download | pakakeh.go-3f02602db8cfe6fbb09d550ac723fc251eb81f1d.tar.xz | |
lib/dns: refactoring, create type RecordType to represent type of RR
Previously, we use uint16 to represent type for ResourceRecord Type or
Question type.
To make the code more strict, where parameter or return value, must be
expected as record type, we add new type to represent the RR type:
RecordType.
This changes also rename any variable name of QType or qtype to RType
or rtype because QType is misleading. The type defined the
ResourceRecord to be queried not only question.
Diffstat (limited to 'lib/dns/server_example_test.go')
| -rw-r--r-- | lib/dns/server_example_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns/server_example_test.go b/lib/dns/server_example_test.go index a2a69eb7..e58977e9 100644 --- a/lib/dns/server_example_test.go +++ b/lib/dns/server_example_test.go @@ -15,7 +15,7 @@ func clientLookup(nameserver string) { return } - msg, err := cl.Lookup(false, dns.QueryTypeA, dns.QueryClassIN, + msg, err := cl.Lookup(false, dns.RecordTypeA, dns.QueryClassIN, "kilabit.info") if err != nil { log.Println(err) |
