Closed ttytm closed 5 months ago
The cmd/
folder is useful for those wanting to unit-test their main
function, in a application. Put main.v
in the root, that all it does is import cmd
and call the real start of the program. Nothing to really test, there.
But then everything in cmd
should be unit-testable, which means 99+% of your app, instead of only 99+% of whatever is NOT inside main
.
However, it definitely doesn't need to be the default.
Will allow use
v [options] [command] [arguments]
in the root of the project.Like
v .
to build the project. When VPM progresses to allow for binary installations, following the default directory structure will eventually allow to install binary projects like this directly via the package manager.