What do you all think about using GitHub Pages URLs for import paths? I got to thinking about that because Go is moving towards having real dependency management, and it looks like the repo is going to be the unit of versioning. That implies that repo boundaries are going to be changing a lot in the next year or two, as people split up multi-package repos in order to version packages separately. If you use the repo URL directly as an import path (e.g. "github.com/jba/gorepo/pkg1"), then splitting the repo will change the import path.
To avoid changing the import path, you can use the import path redirection <https://golang.org/cmd/go/#hdr-Remote_import_paths> feature (a.k.a. vanity paths). I can have import paths "jba.org/pkg1" and "jba.org/pkg2" both point to "github.com/jba/gorepo" initially. If I later decide to have separate repos for pkg1 and pkg2, I can keep the same import paths and just change where they point. To use import path redirection, though, you need both a domain and a server to host it. Many people already have that, but if you don't it would be nice if there were a zero-effort way to get one. I realized that GitHub Pages seems like a good choice for that. In case you're not familiar, GitHub gives you a free static site for your username or org (jba.github.io, in my case) that you have total control over, so you can embed the necessary meta tag to make import path redirection work. The URL is not ideal, but it's no worse than the raw repo URL. I'd guess the availability of the site is the same or only a little less than the availability of the repo itself. There are limits on the site, notably 100G bandwidth/month, but unless you're hosting a lot of content or have a very popular package, you're unlikely to hit that. Does anyone already do this? Are there downsides that I'm missing? -- 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. For more options, visit https://groups.google.com/d/optout.