{"id":53964,"library":"sparrc-go-ping","title":"go-ping","description":"An ICMP ping library for Go that emulates the Unix ping command, sending and receiving ICMP packets.","status":"active","version":"1.2.0","language":"go","source_language":null,"source_url":"https://github.com/sparrc/go-ping","tags":["ping","icmp","network","utility"],"install":[{"cmd":"go get github.com/sparrc/go-ping","lang":"bash","label":"Install github.com/sparrc/go-ping"}],"dependencies":[],"imports":[{"symbol":"ping","correct":"github.com/sparrc/go-ping"}],"quickstart":{"code":"package main\n\nimport (\n\t\"fmt\"\n\t\"github.com/sparrc/go-ping\"\n)\n\nfunc main() {\n\tpinger, _ := ping.NewPinger(\"google.com\")\n\tpinger.Count = 3\n\tpinger.OnRecv = func(pkt *ping.Packet) {\n\t\tfmt.Printf(\"%d bytes from %s: icmp_seq=%d time=%v\\n\",\n\t\t\tpkt.Nbytes, pkt.IPAddr, pkt.Seq, pkt.Rtt)\n\t}\n\tpinger.Run()\n}","lang":"go","description":"Ping google.com 3 times and print each response."},"warnings":[{"fix":"Run the program with sudo or set capabilities (e.g., setcap cap_net_raw+ep).","message":"Requires elevated privileges on some systems to create raw sockets.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'command':15 'emul':11 'go':2,9 'go-p':1 'icmp':5,19,22 'librari':7 'network':23 'packet':20 'ping':3,6,14,21 'receiv':18 'send':16 'unix':13 'util':24","created_at":"2026-06-15T08:04:59.040094+00:00","updated_at":"2026-06-15T08:04:59.040094+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/sparrc/go-ping","github":"https://github.com/sparrc/go-ping","docs":"https://pkg.go.dev/github.com/sparrc/go-ping#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-15","next_check":"2026-12-12","install_tag":null}}