From 23f07cb671ce56b76c6d0f063825ea1e85c47cb1 Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Tue, 20 Aug 2024 10:29:51 +0700 Subject: [PATCH 1/2] docs: update example usage Signed-off-by: Dwi Siswanto --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cf7a192..490ec4f 100644 --- a/README.md +++ b/README.md @@ -42,11 +42,16 @@ import ( ) func main() { - // it requires a list of resolvers - resolvers := []string{"8.8.8.8:53", "8.8.4.4:53"} + // It requires a list of resolvers. + // Valid protocols are "udp", "tcp", "doh", "dot". Default are "udp". + resolvers := []string{"8.8.8.8:53", "8.8.4.4:53", "tcp:1.1.1.1"} retries := 2 hostname := "hackerone.com" - dnsClient := retryabledns.New(resolvers, retries) + + dnsClient, err := retryabledns.New(resolvers, retries) + if err != nil { + log.Fatal(err) + } ips, err := dnsClient.Resolve(hostname) if err != nil { From b2c6d23db52988a168f2f084aad5363f8b891bed Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Tue, 3 Sep 2024 05:33:26 +0700 Subject: [PATCH 2/2] docs(README): update key-features Signed-off-by: Dwi Siswanto --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 490ec4f..1504233 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ Based on `miekg/dns` and freely inspired by `bogdanovich/dns_resolver`. ## Features -- Supports system default resolvers along with user supplied ones -- Retries dns requests in case of I/O, Time, Network failures +- Supports both system default DNS resolvers and user-provided ones +- Retries DNS requests in case of I/O errors, timeouts, or network failures - Allows arbitrary query types - Resolution with random resolvers +- Compatible with various DNS resolver protocols (TCP, UDP, DoH, and DoT) ### Using *go get*