vlang / v-analyzer

The @vlang language server, for all your editing needs like go-to-definition, code completion, type hints, and more.
MIT License
92 stars 10 forks source link

build: follow a default directory structure for V projects #25

Closed ttytm closed 5 months ago

ttytm commented 5 months ago

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.

JalonSolov commented 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.