x/pkgsite: possible change in how example links work #48707
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
pkgsite
Milestone
https://golang.org/cl/353391 points out that a link in Effective Go () does not work. The link is https://golang.org/pkg/strings/#example_Map. That link currently just goes to the docs for the strings package. If we change the underscore to a hyphen (https://golang.org/pkg/strings/#example-Map) then it links to the example.
The link has been there since 2013 (added in https://golang.org/cl/7454044) and it seems to me unlkely that nobody ever checked that the link worked. While I can't prove it, it seems much more likely that this broke when golang.org was moved over to pkg.go.dev.
It seems to me that we should make the underscore links work for examples, unless there is some good reason not to. Thanks.
The text was updated successfully, but these errors were encountered: