| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This change refactors the formatter to be an interface called Printer.
`NewApp` will use the functionality of `ScreenPrinter`, which is what I
refactored the old `Formatter` class into.
There is a new class the implements the `Printer` interface called
`MemoryPrinter`, which will simply store the `groups` as they were
passed to it. This will allow tests in `app_test.go` to become much
more powerful, since `App` no longer needs to be tightly coupled to
printing to the screen.
|
| |
|
|
|
|
| |
Sub-command "ln" is redefined to the function of listing all todos
with their notes; "n" replaces original "ln", listing the notes of
a specific todo.
|
| | |
|
| |
|
|
|
|
|
| |
Now, todos have a priority flag. When listed, these todos will be
bolded and italic.
You can list todos by priority by running `todolist l p`.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the panic() function provides overwhelming messages available
for developers but meaningless to users, the way to deal with error
output is simplified.
There are two panic()'s that are fixed:
* The one in parseArbitraryDateWithYear() function.
This function is the possible endpoint of adding a todo or editing
dues. Instead of calling panic(), now it outputs the specific
parsing error, and then terminate itself by os.Exit().
* The one in formatDue() function
This function is responsible for parsing the due information of a
given todo. If the todos being added previously have passed the
checking, then there is no reason that a due fails the format
check here, except for the corruption of the todo file.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|