UI Work
This commit is contained in:
12
cli/cli.go
12
cli/cli.go
@@ -43,6 +43,18 @@ func (p *Program) LoadTimerList() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *Program) WriteLists() error {
|
||||
err := p.WriteTimerList()
|
||||
if dErr := p.WriteDoneList(); dErr != nil {
|
||||
if err == nil {
|
||||
return fmt.Errorf("Error writing Done list %w", dErr)
|
||||
} else {
|
||||
return fmt.Errorf("Error writing Both lists (Timer: %s; Done: %s) (%w)", err.Error(), dErr.Error(), err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *Program) WriteTimerList() error {
|
||||
return p.TimerList.WriteToFilename(p.timerPath)
|
||||
}
|
||||
|
Reference in New Issue
Block a user