docs: receiveStatusCmd docstring & typo fix

This commit is contained in:
decentral1se 2023-12-29 10:16:30 +01:00
parent d609dbaf2c
commit d1c87cb316
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 4 additions and 1 deletions

View File

@ -115,12 +115,15 @@ func NewModel(username, homeDir string, debug bool) model { // nolint:revive
}
}
// receiveStatusCmd signals for lines from the statusBuffer to be rendered in
// the statusViewport. This command is repeatedly called by the logic which
// responds to a renderStatusMsg in Update.
func (m model) receiveStatusCmd() tea.Msg {
return renderStatusMsg{line: <-m.statusBuffer}
}
// sendStatusCmd delivers a tea.Msg to bubbletea for rendering lines from the
// statusbuffer. Unlinke sendStatus, this method is an actual tea.Cmd.
// statusBuffer. Unlike sendStatus, this method is an actual tea.Cmd.
func (m model) sendStatusCmd(lines ...string) tea.Cmd {
return func() tea.Msg {
return sendStatusMsg{lines: lines}