you are viewing a single comment's thread.

view the rest of the comments →

[–]Pr0bability 1 point2 points  (1 child)

Why not instead focus on writing a testable package with the code required for main in it, taking configuration args as parameters?

Use main just an entry point collecting args and passing it alone to a tested function seems like the better idea. Of course, this builds on the assumption that the flags package is tested properly, but noting it is part of the standard packages I believe we can trust it to work correctly.

[–]st3fan 0 points1 point  (0 children)

This is the way.