diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-18 16:28:37 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-04-18 16:28:37 -0400 |
commit | 3b6279ddf21ca58b8cf9469c04a249d69ea449cb (patch) | |
tree | dbbe3febfc4d4aa889fee787d4d934b9f4720d07 /ping.go | |
parent | 45717808e4c8861e022e838aacb8215c81dcd327 (diff) |
add comments, fiddle with function publicity
Diffstat (limited to 'ping.go')
-rw-r--r-- | ping.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -7,6 +7,9 @@ import ( "strings" ) +// Ping sends one ICMP echo packet to the given IP and times how long +// it takes to get a response, in milleseconds. Returns -1 if no +// response is received. func Ping(ip net.IP) float64 { cmd := exec.Command("ping", "-n", // numeric |