diff options
author | Jordan <me@jordan.im> | 2022-02-14 23:17:42 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2022-02-14 23:17:42 -0700 |
commit | a39310f111cef49ff630cc12fdebabc4df37ec28 (patch) | |
tree | b2f3778cb49ed2ed2c3283db079285ca0084b704 /cmd | |
parent | a6a6fef1c7cc7d6878e8aa36541565fb3e0c9747 (diff) | |
download | crawl-a39310f111cef49ff630cc12fdebabc4df37ec28.tar.gz crawl-a39310f111cef49ff630cc12fdebabc4df37ec28.zip |
client, crawl: fix/simplify net.Dialer overrides
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/crawl/crawl.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/crawl/crawl.go b/cmd/crawl/crawl.go index 63fda1a..8f84837 100644 --- a/cmd/crawl/crawl.go +++ b/cmd/crawl/crawl.go @@ -348,14 +348,14 @@ func main() { log.Fatal(err) } - httpClient = crawl.NewHTTPClientWithDNSOverride(dnsMap) - if *bindIP != "" { addr, err := net.ResolveIPAddr("ip", *bindIP) if err != nil { log.Fatal(err) } - httpClient = crawl.NewHTTPClientWithLocalAddrOverride(addr) + httpClient = crawl.NewHTTPClientWithOverrides(dnsMap, addr) + } else { + httpClient = crawl.NewHTTPClientWithOverrides(dnsMap, nil) } crawler, err := crawl.NewCrawler( |