Writing and running full e2e integration tests using Go and for Go CLI applications. Lookingo into one of:
@firstname.lastname@example.org Whoops, I must have missed the
error return value! That sounds good to me. When there are just fatal errors that abort the program execution, a main function returning an error is definitely enough.
Hmm, if you don’t want to report errors to stderr, where do you write them to? Hopefully not stdout. A log file? It obviously depends on the program and such, but generally I do not want to dig up errors from a log file. Usually, I find it much more convenient to see them directly. Properly dealing with stdout and stderr basically provides the capabilities for free to be pipeline-ready. And of course,
-q or something along those lines is also a good choice. When talking about more serious programs, that is. Not just some quickly cobbled together helper.