1package common
 2
 3import tea "github.com/charmbracelet/bubbletea"
 4
 5// ErrorMsg is a Bubble Tea message that represents an error.
 6type ErrorMsg error
 7
 8// ErrorCmd returns an ErrorMsg from error.
 9func ErrorCmd(err error) tea.Cmd {
10	return func() tea.Msg {
11		return ErrorMsg(err)
12	}
13}