mirror of
https://github.com/go-ping/ping.git
synced 2026-07-13 11:44:00 +00:00
Move the DNS resolver out of the NewPinger() function in order to allow adjusting of IPv4 vs IPv6 DNS resolution before running. This also allows the user to verify resolution. * Create new `New()` method that returns a bare default struct. * Create new `Resolve()` method. * Call `Resolve()` from `SetAddr()`. * Call `Resolve()` automatically from `Run()`. * Remove unecessary private `run()` method. Update ping command for simplifed return values of `NewPinger()`. Signed-off-by: Ben Kochie <superq@gmail.com>
12 KiB
12 KiB