4 ms·
That's why there's https://go.dev/ref/mod#vcs-find https://go.dev/ref/mod#vcs-find . Your import path doesn't have to map directly to vcs repos, as long as you
by arccy 2y ago
That's why there's https://go.dev/ref/mod#vcs-find https://go.dev/ref/mod#vcs-find .
Your import path doesn't have to map directly to vcs repos, as long as you can serve an html meta tag to redirect it to where your current repo is:
<meta name="go-import" content="root-path vcs repo-url">
- leaveyou 2y agoThanks for the link. When I started learning Go modules that spec was not available (or it was a lot smaller). After a brief look I feel the Go modules spec is longer and more complex than the (original) Go language spec which is quite ironic :-D. I still like Go although it's sad seeing it straying from the 'one true' path of simplicity.
- arccy 2y agoIt's a bit shorter than the current spec, but it does cover more: how it works conceptually, how the default toolchain works, and how it interacts with a lot of things outside of a world it creates on its own (which is what a language is).
- Joker_vD 2y agoBut you can't serve this meta tag if you don't control the URL/domain anymore, and you can't force all of your users to use e.g. an intercepting HTTP proxy for such requests.
- arccy 2y agoYou need to plan for this up front, same as with deliberately uploading a package to a central repo.