aboutsummaryrefslogtreecommitdiffstats
path: root/todolist/formatter.go
Commit message (Collapse)AuthorAgeFilesLines
* Refactor the formatter to an interface and rename itGrant Ammons2017-10-031-152/+0
| | | | | | | | | | | | 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.
* Redefine sub-commands: "ln" and "n"Quey-Liang Kao2017-08-201-12/+7
| | | | | | 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.
* Implement the "ln" feature: Listing notes of a todoQuey-Liang Kao2017-08-141-0/+11
|
* Add priority featureGrant Ammons2017-03-031-18/+34
| | | | | | | 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`.
* Support UTF-8 strings as contexts and projectsQuey-Liang Kao2017-01-261-2/+2
|
* Makes all output messages consistentQuey-Liang Kao2017-01-191-1/+3
| | | | | | | | | | | | | | | | | | | 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.
* Run gofmt on formatter and parserHuu Nguyen2017-01-161-1/+1
|
* Remove large amounts of whitespace at beginning, to save spaceGrant Ammons2016-05-171-2/+2
|
* Fix formatting error when no due dateGrant Ammons2016-05-041-4/+4
|
* alpha-sort groupsGrant Ammons2016-05-041-3/+9
|
* Make everything a pointer, add archive completed fnGrant Ammons2016-05-031-1/+1
|
* Handle parsing dates, and printing themGrant Ammons2016-04-301-6/+55
|
* Get grouping working correctlyGrant Ammons2016-04-251-10/+16
|
* Bring in the app and routerGrant Ammons2016-04-241-0/+67