Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Suggestions for setting up a Go project (cheney.net)
28 points by enobrev on Nov 30, 2014 | hide | past | favorite | 6 comments


It's worth mentioning that there isn't actually anything special about "Github, Bitbucket, Google code" with relation to go get. Those sites are actually just serving up a web page with a meta tag of name "go-import" with info that go get uses to grab the repos. You can, and I have, put that meta tag on any page and get the same functionality


That's not quite true; the "vcs" portion of the Go source code has special code to handle github.com, code.google.com, bitbucket, and some others.

It may have support for a "go-import" file that you speak of, but it definitely has hard-coded knowledge of some popular vcs sites.


Well, it may have hardcoded support for those, but if you look closely, even github has the go-import meta tag. It's just worth mentioning, cause you can put it on your own pages, pointing at your own git repo. There's nothing saying "Get on github if you want people to be able to go get your code"


GitHub has the meta tag on some, but not all of the pages where 'go get' expects to find the tag. An example of a page without the tag is https://github.com/golang/lint/golint?go-get=1.


That's interesting, I didn't know that. Just discovered that the go-import meta tag on Github appears on every repo, not just Go ones.


It's interesting that GitHub added the meta tag given that 'go get' and similar tools like godoc.org don't look for the tag on GitHub. These tools have knowledge about GitHub baked in.

Also, GitHub does not include the meta tag on all pages where 'go get' would expect to find the meta tag. For example, the tag is not on the page https://github.com/golang/lint/golint?go-get=1.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: