github.com/scientiacoder/go-PingClient (go): Package pingclient is a simple but powerful ICMP echo (ping) library. Inspired by go-fastping and go-ping  Here is a very simple example that sends and receives three packets:  Here is an example that pings github.com and 8.8.8.8 command:  pingClient := ping.New() pingClient.Add("github.com") pingClient.Add("8.8.8.8")  // Listen for Ctrl-C. c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt)  pingClient.OnFinish = func(stats []*ping.Statistics) {  err := pingClient.Run()  It sends ICMP Echo Request packet(s) and waits for an Echo Reply in response. If it receives a response, it calls the OnRecv callback. When it's finished, it calls the OnFinish callback.  For a full ping example, see "cmd/ping.go".
Keywords: go|icmp|ping|yaml