Skip to content
Myr

convenience function for creating an ErrMsg from an error

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Rocha · committed by Christian Rocha · parent e1d4a14 · Browse files · 1 file+6 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:tea.go+6 added
57 unmodified lines
58func NewErrMsg(s string) ErrMsg {59 return ErrMsg{errors.New(s)}60}6162// NewErrMsgFromErr is a convenience function for creating an ErrMsg from an63// existing error64func NewErrMsgFromErr(e error) ErrMsg {65 return ErrMsg{e}66}6768// Quit is a command that tells the program to exit69func Quit(_ Model) Msg {70 return quitMsg{}71}
131 unmodified lines