Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/pkgsite: modules with no package at the root directory are shown awkwardly #36791
For example, say I want to share a module with friends. Coming from godoc.org, and being used to
However, that page looks wrong. It simply lists the subdirectories, not showing much else that's useful besides the version and license.
Perhaps I have to click into the "overview" tab? That seems to work, as it shows me the README at least. But other useful tabs like
It turns out what I actually want is https://pkg.go.dev/mod/mvdan.cc/sh/v3. Funnily enough, that page looks almost exactly the same as the previous overview tab, but with a different set of tabs.
I find this pretty confusing. As a module author, which one should I be sharing with others? I think I clearly want the last URL for the module view, but I presume many Go users will go through the same three-step dance to get to the information we want, just like I did.
I think the root of the problem here is that we're not giving module information enough priority. I see two ways we could address this; they could both be done at the same time.
In my particular case, 1 would be important so that people find what's useful right away, even if they try the "wrong" URL. If they really do want the package subdirectories, they can always use https://pkg.go.dev/mvdan.cc/sh/v3?tab=subdirectories.
Number 2 would make the site far less confusing in my eyes. The discovery site seems to give preference to packages over modules, which I assume is to be expected given
For the record, about eight months ago I argued that the
Unfortunately, the feedback had to be given in private, and I presume the decision to discard the idea happened in person or in private. I'd like to think that it's not too late to consider the idea.