Hello Gert,

It looks like you are experimenting with the "major subdirectory" layout 
for modules.

It looks like your v1 module is incorrectly specified, including with an 
incorrect trailing "/v1":

   https://github.com/gertcuykens/module/blob/v4.0.0/v1 
<https://github.com/gertcuykens/module/blob/v4.0.0/v1/go.mod#L1>

Usually you would not have a "/v1" subdirectory if you are following the 
"major subdirectory" layout. If you have the v1 module in the same branch 
as your v2, v3, and v4 modules, then usually the v1 module would be in the 
root directory of the repo, and not a /v1 subdirectory, and there would be 
no traililng "/v1" on the module line of the go.mod there.

This is described in more detail here:

   https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

Note that section also describes an alternative layout called the "major 
branch" layout for modules, which does not use any "/vN" subdirectories, 
and which some people find simpler to manage at this point.

There is also a much longer discussion of those two alternative layouts 
here:

   https://research.swtch.com/vgo-module
  <https://research.swtch.com/vgo-module>
In summary, I think the answer to your question is "no, that is not a 
standard practice".

Regards,
thepudds

On Tuesday, October 22, 2019 at 2:42:34 AM UTC-4, Gert wrote:
>
>
> Example https://github.com/gertcuykens/module/tree/v4.0.0 can I assume it 
> to be good practice to put a empty go.mod file in the root directory that 
> doesn't contain other go files, only the version folders, so the root 
> itself doesn't get recognised as a module itself?
>

-- 
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/34d4ae99-f949-4850-b3c2-e2d1328dad32%40googlegroups.com.

Reply via email to