This commit is contained in:
Kujtim Hoxha
2025-03-23 14:56:32 +01:00
parent 4b0ea68d7a
commit 7844cacb25
8 changed files with 322 additions and 25 deletions

18
internal/tui/util/util.go Normal file
View File

@@ -0,0 +1,18 @@
package util
import tea "github.com/charmbracelet/bubbletea"
func CmdHandler(msg tea.Msg) tea.Cmd {
return func() tea.Msg {
return msg
}
}
func ReportError(err error) tea.Cmd {
return CmdHandler(ErrorMsg(err))
}
type (
InfoMsg string
ErrorMsg error
)