Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/pkgsite: Some examples of functions are missing, but there are relevant example codes in the source code #69654

Closed
cuishuang opened this issue Sep 27, 2024 · 3 comments
Labels
Milestone

Comments

@cuishuang
Copy link
Contributor

cuishuang commented Sep 27, 2024

What is the URL of the page with the issue?

https://pkg.go.dev/maps

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Screenshot

image

What did you do?

I noticed that the examples for the maps package on pkg.go.dev are missing. The newly added methods like All, Keys, and others (5 in total) don't have examples, even though they exist in maps/example_test.go.

After that, I checked the documentation for slices and found the same issue: the examples for the new methods, such as All, Backward, and 5 others, are missing — but again, they are present in slices/examples_test.go.

image

The awkward part is that I was the last person to modify both files. After a brief moment of panic, I ran godoc -http=:9092 -goroot="." locally and accessed http://127.0.0.1:9092/pkg/maps/, and everything was as expected, with the examples present.

image

image

What did you see happen?

I'm not entirely sure about the difference between godoc -http=:9092 -goroot="." and pkg.go.dev, but I suspect that pkg.go.dev might be using a different Go version than the one marked here: Version: go1.23.1 Latest Published: Sep 5, 2024.

What did you expect to see?

Does this issue need to be fixed? Please give me some advice, I am happy to continue researching and fixing this issue

@gopherbot gopherbot added this to the Unreleased milestone Sep 27, 2024
@seankhliao
Copy link
Member

you're looking at the docs for 1.23.1, but the added examples are in tip, see https://pkg.go.dev/maps@master

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@cuishuang
Copy link
Contributor Author

you're looking at the docs for 1.23.1, but the added examples are in tip, see https://pkg.go.dev/maps@master

I see...thanks for your guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants