chore: break up Start into several, more maintainable methods

This commit is contained in:
Christian Muehlhaeuser
2022-10-06 18:39:57 +02:00
parent 0e76ba142a
commit 2696b2f339
2 changed files with 165 additions and 138 deletions

4
tty.go
View File

@@ -51,12 +51,12 @@ func (p *Program) initCancelReader() error {
}
p.readLoopDone = make(chan struct{})
go p.eventLoop()
go p.readLoop()
return nil
}
func (p *Program) eventLoop() {
func (p *Program) readLoop() {
defer close(p.readLoopDone)
for {