|
|
|
|
|
by Manishearth
2652 days ago
|
|
As far as I can tell, rsc.io/sampler isn't a git repository, so it's not doing the same stuff `go get` does. If I try to clone it I just get hit by the HTTP redirect to the docs for rsc.io/sampler. I may be missing something here (it's been quite a while since I did serious Go stuff so `go get` may have changed too) > Does it, though? It's a blog-post, not the "normal" documentation. The full docs are much more explicit and nitty-gritty than a high-level blog post. It's a bit weird to have a blog post about the new module system with nothing about how modules can be published, a pretty common task. |
|
Why would you try to `git clone` it directly instead of trying to `go get` it?
It's been that way since at least 1.2 (I'm pretty sure since 1.0, but I haven't verified that memory). The process that `go get` follows is described by `go help importpath`.The TL;DR is that it fetches `https://${pkgpath}?go-get=1`, and looks for `<meta name="go-import" content="...">` to tell it where to `git clone` from (with some hard-coded hacks for common websites that don't support that, like github.com).
> It's a bit weird to have a blog post about the new module system with nothing about how modules can be published, a pretty common task.
Because that hasn't changed. You still publish packages the same way you always have. The only difference in how you publish is that now "vSEMVER" git tags mean something.