Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/godoc: list packages in the correct order #15020
https://github.com/golang/go/wiki/CodeReviewComments#imports says that
However godoc simply sorts imports in lexicographical order.
The order should be:
Sorry, but what do you mean with "use golang.org/x/tools/cmd/goimports"?
I'm referring to the package index available at
As you can see from https://imagebin.ca/v/2c2N6BhjBUmp, finding documentation for a standard package is quite a pain, since all third party packages are interleaved with standard packages.
I added a reference to CodeReviewComments because Go programmers expect to see packages listed in a well defined order, and this order is not respected by godoc.
However the real problem is that godoc package listing seems to be specialized for https://golang.org/pkg/.
One possible solution is to add an additional section, that it is only visible when there are third-party packages installed on the system.