|
|
@@ -1,7 +1,6 @@
|
|
|
-package tui
|
|
|
+package pingo
|
|
|
|
|
|
import (
|
|
|
- "pingo/internal/ping"
|
|
|
"time"
|
|
|
|
|
|
"github.com/charmbracelet/lipgloss"
|
|
|
@@ -22,12 +21,12 @@ func (a *Address) Truncate() (truncated bool) {
|
|
|
return false
|
|
|
}
|
|
|
|
|
|
-// Wraps [ping.Ping]
|
|
|
+// Wraps [Ping]
|
|
|
func (a *Address) Ping() (delay float64, err error) {
|
|
|
- return ping.Ping(a.Address)
|
|
|
+ return Ping(a.Address)
|
|
|
}
|
|
|
|
|
|
-// Poll pings the affiliated Address and appends it to a.results
|
|
|
+// Poll the affiliated Address and appends it to a.results
|
|
|
func (a *Address) Poll() (success bool, err error) {
|
|
|
if delay, err := a.Ping(); err == nil {
|
|
|
a.results = append(a.results, delay)
|