aboutsummaryrefslogtreecommitdiff
path: root/lib/dns/server_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-11-14 18:13:10 +0700
committerShulhan <ms@kilabit.info>2021-11-14 18:13:10 +0700
commitc2f3d1575ad29294ebadb9dd7ee6d7a06dc955ae (patch)
treede6ffe45db74c5d305ad71616bef63b07e0f08c6 /lib/dns/server_example_test.go
parent3f02602db8cfe6fbb09d550ac723fc251eb81f1d (diff)
downloadpakakeh.go-c2f3d1575ad29294ebadb9dd7ee6d7a06dc955ae.tar.xz
lib/dns: refactoring, introduce new type RecordClass
Previously, the record class is represented by uint16 using prefix QueryClassXxx. This changes make the record class to be an independent type, to make code more strict (prevent passing invalid value), and readable.
Diffstat (limited to 'lib/dns/server_example_test.go')
-rw-r--r--lib/dns/server_example_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dns/server_example_test.go b/lib/dns/server_example_test.go
index e58977e9..b0efedfc 100644
--- a/lib/dns/server_example_test.go
+++ b/lib/dns/server_example_test.go
@@ -15,8 +15,7 @@ func clientLookup(nameserver string) {
return
}
- msg, err := cl.Lookup(false, dns.RecordTypeA, dns.QueryClassIN,
- "kilabit.info")
+ msg, err := cl.Lookup(false, dns.RecordTypeA, dns.RecordClassIN, "kilabit.info")
if err != nil {
log.Println(err)
return