refactor: add diale options to internal resolver

This commit is contained in:
Shengjing Zhu
2022-07-22 22:38:20 +08:00
parent 252040b47c
commit 5dc8b57908
4 changed files with 88 additions and 54 deletions

View File

@@ -26,7 +26,7 @@ func TestResolve(t *testing.T) {
} {
t.Run(server, func(t *testing.T) {
d := &net.Dialer{
Resolver: New(server),
Resolver: New(server, (&net.Dialer{}).DialContext),
}
c, err := d.Dial("tcp4", "www.example.com:80")
if err != nil {