mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-09 18:29:39 +00:00
19 lines
263 B
Go
19 lines
263 B
Go
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
|
|
)
|