mirror of
https://github.com/go-ping/ping.git
synced 2025-07-16 07:06:00 +00:00
Update doc on privileged ping and install
This commit is contained in:
parent
77403bd6ed
commit
3535a0e9a0
16
README.md
16
README.md
@ -43,7 +43,21 @@ It sends ICMP packet(s) and waits for a response. If it receives a response,
|
||||
it calls the "receive" callback. When it's finished, it calls the "finish"
|
||||
callback.
|
||||
|
||||
For a full ping example, see "cmd/ping/ping.go".
|
||||
For a full ping example, see
|
||||
[cmd/ping/ping.go"](https://github.com/sparrc/go-ping/blob/master/cmd/ping/ping.go)
|
||||
|
||||
## Installation:
|
||||
|
||||
```
|
||||
go get github.com/sparrc/go-ping
|
||||
```
|
||||
|
||||
To install the native Go ping executable:
|
||||
|
||||
```bash
|
||||
go get github.com/sparrc/go-ping/...
|
||||
$GOPATH/bin/ping
|
||||
```
|
||||
|
||||
## Note on Linux Support:
|
||||
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
var usage = `
|
||||
Usage:
|
||||
|
||||
ping [-c count] [-i interval] [-t timeout] host
|
||||
ping [-c count] [-i interval] [-t timeout] [--privileged] host
|
||||
|
||||
Examples:
|
||||
|
||||
@ -26,6 +26,9 @@ Examples:
|
||||
|
||||
# ping google for 10 seconds
|
||||
ping -t 10s www.google.com
|
||||
|
||||
# Send a privileged raw ICMP ping
|
||||
sudo ping --privileged www.google.com
|
||||
`
|
||||
|
||||
func main() {
|
||||
|
Loading…
Reference in New Issue
Block a user