From fd39c680d5cc0bdb96b04b21443bd36c2c11c7f2 Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Fri, 6 Oct 2023 11:37:23 -0400 Subject: [PATCH] Update resolver.go --- dns/resolver.go | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/dns/resolver.go b/dns/resolver.go index b9b9349e..8df4d548 100644 --- a/dns/resolver.go +++ b/dns/resolver.go @@ -14,17 +14,11 @@ package dns -/* - A resolver is a function that resolves a hostname to a list of IP addresses. - - TODO: provide factory methods to create a Resolver. For example: - - ```go - manualDns := makeManualResolver( - map[string][]string{ "example.com": []string{"255.255.255.255:80" } - }) - - dialer := &shadowsocks.NewStreamDialer(endpoint, key, manualDns) - ```` -*/ -type Resolver func(host string) ([]string, error) \ No newline at end of file +// A resolver is a function that resolves a hostname to a list of IP addresses. +// TODO: provide factory methods to create a Resolver. For example: +// manualDns := makeLocalResolver( +// map[string][]string{ "example.com": []string{"255.255.255.255:80" } +// }) +// +// dialer := &shadowsocks.NewStreamDialer(endpoint, key, manualDns) +type Resolver func(host string) ([]string, error)