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: Package-level example not showing up on pkg.go.dev #48705

Closed
spakin opened this issue Sep 30, 2021 · 2 comments
Closed

x/pkgsite: Package-level example not showing up on pkg.go.dev #48705

spakin opened this issue Sep 30, 2021 · 2 comments

Comments

@spakin
Copy link

spakin commented Sep 30, 2021

What is the URL of the page with the issue?

https://pkg.go.dev/github.com/spakin/accumimage

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36

Screenshot

accumimage

What did you do?

My GitHub repository, https://github.com/spakin/accumimage, contains a package-level example (no Output:) in scaledown_test.go. This is not showing up when I view the page on https://pkg.go.dev/github.com/spakin/accumimage. However, it does show up when I run godoc -ex . from the command line so I don't think my expression of the example is erroneous.

What did you expect to see?

I expected to see an Examples section in the documentation with my example code listed.

What did you see instead?

Nothing. The page went right from Overview to Index. An Examples section appears nowhere on the page.

@gopherbot gopherbot added this to the Unreleased milestone Sep 30, 2021
@seankhliao
Copy link
Member

Examples can't have arguments, go vet warns about this

@spakin
Copy link
Author

spakin commented Sep 30, 2021

Got it. I'll remove the arguments and try again. Thanks for the prompt response.

@golang golang locked and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants