Is there a way to get an unchanging URL that always redirects to the latest 
major version of a package on pkg.go.dev?

Right now, if I go to
  https://pkg.go.dev/$PACKAGE_NAME
I get the documentation for either v0 or v1 of a package, which is out of 
date if there's a more recent major version.

What I would like is a URL that given $PACKAGE_NAME always redirects to the 
latest major version of that package. For example, a URL something like
  https://pkg.go.dev/$PACKAGE_NAME@latest
which would redirect to
  https://pkg.go.dev/$PACKAGE_NAME/v2
if the latest major version of $PACKAGE_NAME is v2.

The reasons for this request are:
1. I'm usually using the latest version of the package, and so I want to 
see the docs for the most recent version.
2. If users stumble across documentation for an old major version by 
default then there's a risk that they'll use or evaluate the old major 
version by default. Usually there's a good reason why users should not be 
using the old major version.

Right now, pkg.go.dev displays a tiny black text on a grey background line 
at the top of  the page that says something like:
  The highest tagged major version is v61.
See https://pkg.go.dev/github.com/google/go-github for an example. This is 
extremely easy to miss. Alternatively, this banner should be in big red 
letters - if you're using this version of the module then you're probably 
doing something wrong.

If there's support for this new URL and/or the banner usability 
improvement, then I'd be happy to contribute a fix.

Thoughts?

Regards,
Tom

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/94837840-dfb7-4c51-9db4-ab184fd8aec1n%40googlegroups.com.

Reply via email to