@@ -1,9 +0,0 @@
-package tui
-
-// A simple boolean flag sent when the program is ready to poll addresses
-type pollMsg bool
-// / A simple error message binding to conform to type [tea.Cmd]
-type errMsg struct{ err error }
-func (e errMsg) Error() string { return e.err.Error() }
@@ -40,8 +40,6 @@ func (m Model) Init() tea.Cmd {
return m.Tick()
}
-type tickMsg time.Time
func (m Model) Tick() tea.Cmd {
return tea.Tick(time.Millisecond*m.UpdateSpeed, func(t time.Time) tea.Msg {
return tickMsg(t)
@@ -1,6 +1,9 @@
package tui
-import "pingo/internal/ping"
+import (
+ "pingo/internal/ping"
+ "time"
+)
type Address struct {
Address string
@@ -43,3 +46,13 @@ func (a *Address) Last() (delay float64) {
return -1
+
+type tickMsg time.Time
+// A simple boolean flag sent when the program is ready to poll addresses
+type pollMsg bool
+// / A simple error message binding to conform to type [tea.Cmd]
+type errMsg struct{ err error }
+func (e errMsg) Error() string { return e.err.Error() }