How can you ping an IP address from a golang application? The ultimate goal is to check if a server is online.
Does go have a way in the standard library to implement a network ping?
How can you ping an IP address from a golang application? The ultimate goal is to check if a server is online.
Does go have a way in the standard library to implement a network ping?
As @desaipath mentions, there is no way to do this in the standard library. However, you do not need to write the code for yourself - it has already been done:
Note, sending ICMP packets requires root privileges