Closed jnd-au closed 1 week ago
I'm grateful for the contributions, but please don't make one PR for shopping-list issues that you also created yourself.
FYI all the commits are interrelated with providing the missing test coverage, which is why I bundled these changes after the other PRs.
This PR addresses multiple issues:
main.go
coverage raised from 31.6% to 76.5%).This includes feature-support for date-times like
tz -when 2006-01-02T15:04:05-07:00
.Internally,
main.go
tests are supported through the new filesos_wrapper.go
andos_wrapper_test.go
which provide our ownos
:flag
CLI argument parsing.The residual warts are:
return
afteros.Exit
to support unit testing (in unit-test mode, ouros.Exit
records the exit code without exiting, so the function needs to return instead).os.Stdout()
as an interface function instead of a package field.