V0 of module in subfolder

Is it possible to put v0 and v1 of my golang module into a versioned subdirectory (in the same way as for v2+), or must the code always reside in the root of the module?

The code of the current version?

Well I would like to do initial development in v0 subfolder and then move to v1 in a v1 folder and v2 on a v2 folder, and so on, so that they are all available in a similar way, and explicitly imported with the major version.

It is worth understanding my use case here. I am generating code from certain versioned schemas and I would like to generate the code in the same way for all major versions, without having to treat v0 and v1 in a special way.

On a related note how is it possible to support v0 and v1 at the same time since the v1 files seem to need to go into the root, where the v0 files currently reside?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.