From 2896e0e8e6858296dad88734f90b018fa5beccee Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Fri, 5 Jun 2020 13:45:28 -0400 Subject: [PATCH] Remove now unused vars from old renderer --- tea.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tea.go b/tea.go index ba47975..25d503c 100644 --- a/tea.go +++ b/tea.go @@ -2,7 +2,6 @@ package tea import ( "os" - "sync" "github.com/muesli/termenv" ) @@ -44,20 +43,19 @@ type Program struct { init Init update Update view View - - mutex sync.Mutex - currentRender string } -// Quit is a command that tells the program to exit. +// Quit is a special command that tells the program to exit. func Quit() Msg { return quitMsg{} } -// Signals that the program should quit. +// quitMsg in an internal message signals that the program should quit. You can +// send a quitMsg with Quit. type quitMsg struct{} -// batchMsg is used to perform a bunch of commands. +// batchMsg is the internal message used to perform a bunch of commands. You +// can send a batchMsg with Batch. type batchMsg []Cmd // NewProgram creates a new Program. @@ -66,8 +64,6 @@ func NewProgram(init Init, update Update, view View) *Program { init: init, update: update, view: view, - - mutex: sync.Mutex{}, } } @@ -155,7 +151,7 @@ func (p *Program) Start() error { model, cmd = p.update(msg, model) // run update cmds <- cmd // process command (if any) - mrRenderer.write(p.view(model)) // send to renderer + mrRenderer.write(p.view(model)) // send view to renderer } } }