Original post

I have a use-case where my team is developing code in a VCS that isn’t one of the ones that Go supports integrations with. I’d like to be able to share and import code inside my organization’s network.

I’ve noticed that the Go documentation is fairly vague at times about this topic:

If you keep your code in a source repository somewhere, then you should use the root of that source repository as your base path. For instance, if you have a GitHub account at github.com/user
, that should be your base path.

Note that you don’t need to publish your code to a remote repository before you can build it. It’s just a good habit to organize your code as if you will publish it someday. In practice you can choose any arbitrary path name, as long as it is unique to the standard library and greater Go ecosystem.

There are potentially a number of ways to approach this:

  • Have CI push to a private github repository

  • Inject a module name and version into an Athens Proxy using CI

  • Write a module download protocol compatible server for our VCS

  • … ?

I’m wondering if anyone has experience in this or can recommend anything for this sort of environment or use-case.