go-easyping
is aim to provide very easy to use Ping
method
inspired by github.com/sparrc/go-ping
and github.com/tatsushid/go-fastping
I've tried to use these 2 package but find it not easy enough for most users.
So I write my own.
simple use:
import "github.com/haorenfsa/go-easyping"
// ...
delay, err := easyping.Ping("127.0.0.1") // delay is a time.Duration
// ...
advanced:
import "github.com/haorenfsa/go-easyping"
// ...
opt := &easyping.Option{...}
result, err := easyping.AdvancedPing(opt)
// ...
Install and update with go get -u github.com/haorenfsa/go-easyping
add timeoutsupport hosthandle errorssupport some options- multiple pings with statistics
- other icmp functions like traceroute