fix(deps): Replace deprecated go-ping dependency to pro-bing (maintained fork) (#444)

update go-ping to pro-ping maintained fork

additionally add a hint in the README for previliged mode

Co-authored-by: floj <floj@users.noreply.github.com>
Co-authored-by: TwiN <twin@linux.com>
This commit is contained in:
Flo J
2023-03-26 23:26:40 +02:00
committed by GitHub
parent fb94eea914
commit ee8e0c4b40
4 changed files with 10 additions and 10 deletions

View File

@ -14,8 +14,8 @@ import (
"github.com/TwiN/gocache/v2"
"github.com/TwiN/whois"
"github.com/go-ping/ping"
"github.com/ishidawataru/sctp"
ping "github.com/prometheus-community/pro-bing"
)
var (
@ -168,7 +168,7 @@ func Ping(address string, config *Config) (bool, time.Duration) {
// See https://github.com/TwiN/gatus/issues/132
//
// Note that for this to work on Linux, Gatus must run with sudo privileges.
// See https://github.com/go-ping/ping#linux
// See https://github.com/prometheus-community/pro-bing#linux
pinger.SetPrivileged(runtime.GOOS != "darwin")
err = pinger.Run()
if err != nil {