On Fri, Oct 12, 2018 at 11:29 AM, <packrat...@gmail.com> wrote: > > I was wondering if there's a particular reason to enforce importing golint > from a certain source (see: > https://github.com/golang/lint/commit/9a272034dedb2a3ed05231d5604ce17fb40f0e58). > There seems to be a lot of code in "the wild" importing this project from > github.com as evinced by a number of closed github issues from users asking > why their usual go get isn't working. There's also the issue that the github > repo is usually more discoverable by people looking for tooling than the > repo(s) at golang.org/x. Given the ease-of-use aspect, is there a compelling > reason to prevent people from pulling this from the github mirror? And even > if we've already incurred the cost of making this change for golint, is this > going to be the standard going forward for everything in golang.org/x?
In Go, packages are determined by their import path. That is, using two different import paths means two different packages, even if the source code is identical. So, as a general rule, it's a good idea for any package to enforce that it is imported under a particular import path. The vendoring and modules support are designed to support this. So I'm going to turn the question around: is there a reason to not do this for golint? Clearly anybody who really wants a separate copy can remove the import comment. Ian -- 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.