aboutsummaryrefslogtreecommitdiffstats
path: root/timetask
diff options
context:
space:
mode:
authorTeddy Wing2017-06-03 16:56:42 +0200
committerTeddy Wing2017-06-03 16:56:42 +0200
commit341e22ef6b8290bba8ba43ecddb9f1175b3cafb9 (patch)
tree12d843e380b5edb4988b860c909d68ccef1bca7b /timetask
parent4a4b8e00ae62ec3898b7e4f590bd4a3660a0f535 (diff)
downloadtimetasker-341e22ef6b8290bba8ba43ecddb9f1175b3cafb9.tar.bz2
main.go: Handle the `--date` argument
If no date is passed in, default to the current date. Otherwise, parse the date into a time that can be used to create the `TimeEntry`. * Rename `date` to `date_str` to allow us to use `date` for the `time.Time` that gets sent to `NewTimeEntry()`. * If parsing fails, print an error message and exit. * In order to use the `err` variable without redefining `date` on line 66, define it at the top of the function.
Diffstat (limited to 'timetask')
0 files changed, 0 insertions, 0 deletions