golang/go

x/pkgsite: hyperlink does not inherit version for standard library packages.

Open

#68,755 opened on Aug 7, 2024

View on GitHub
 (5 comments) (0 reactions) (1 assignee)Go (19,008 forks)batch import
NeedsFixhelp wantedpkgsite

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

What is the URL of the page with the issue?

https://pkg.go.dev/iter@go1.23rc2#hdr-Standard_Library_Usage

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0

Screenshot

Working link to the same package, includes version: image

Broken link to a different package, does not include version: image

What did you do?

  1. Open https://pkg.go.dev/iter@go1.23rc2#hdr-Standard_Library_Usage
  2. Click on the link in For example, [maps.Keys](https://pkg.go.dev/maps#Keys) returns an iterator over the keys of a map

What did you see happen?

Observe that the link points to the latest(go1.22.6), which does not contain maps.Keys function. The anchor link is broken. Note: 1.23rc2 does contain that function.

What did you expect to see?

I expected that if I explicitly chose to browse version 1.23rc2, all links would be pointing to that version.

Contributor guide