Hello Everyone,

my development environment is based on Linux and Windows, and I work with 
VS Code in both environments.

Before Go 1.12 I was a "fan" of 
https://github.com/golang-standards/project-layout to organize my projects.
With 1.12 I started to move my project bases out of 
"~/go/src/URI/USER/PROJECT" to a something like 
"REPOBASE/PROJECTS/PROJECT", and I wanted to establish "go.mod".
But several problems rised after this. Sometimes I just had problems to "go 
run" the program, other times VS Code showed several error messages.

Let's say I have the fantastic project "foo", which consists of several 
command line tools like "foo-server", "foo-client-admin", and 
"foo-client-user". Also there are several libraries like "foo-common", 
"foo-server", "foo-client".

With my pre-1.12 approach I would have done something like (just for the 
directories):

  - PROJECTS/foo
  - PROJECTS/foo/cmd/foo-server
  - PROJECTS/foo/cmd/foo-client-admin
  - PROJECTS/foo/cmd/foo-client-user
  - PROJECTS/foo/pkg/foo-common
  - PROJECTS/foo/pkg/foo-client
  - PROJECTS/foo/pkg/foo-server

"PROJECTS/foo" is also my "git root".


So, basically my questions is how should I organize a project to make the 
"go tools" and VS code happy?

For example, where should I do the "go mod init"?
Are library names with hyphens in there names a bad idea?
Is the project layout total rubbish?


Regards,
Boris

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/e08a67f9-3b39-46d6-9f2d-837269e9e63c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to