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.
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.