-
Notifications
You must be signed in to change notification settings - Fork 18.1k
go/doc: whole file is used as example even when there are tests or benchmarks [1.14 backport] #38418
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
Labels
Milestone
Comments
Approved as this is primarily a documentation issue with no workaround (outside of modifying the target source). The change is minimal as well. |
Change https://golang.org/cl/232868 mentions this issue: |
Closed by merging 14c92c5 to release-branch.go1.14. |
gopherbot
pushed a commit
that referenced
this issue
May 11, 2020
After CL 211357 (commit 499dc1c), hasTests and numDecl were not updated properly for function declarations with parameters, which affected the whole file example detection logic. This caused examples like package foo_test func Foo(x int) { } func Example() { fmt.Println("Hello, world!") // Output: Hello, world! } to not be detected as whole file ones. Fixes #38418. For #38409. Change-Id: I9ebd47e52d7ee9d91eb6f8e0257511de69b2a402 GitHub-Last-Rev: cc71c31 GitHub-Pull-Request: #37730 Reviewed-on: https://go-review.googlesource.com/c/go/+/222477 Reviewed-by: Agniva De Sarker <[email protected]> Reviewed-by: Robert Griesemer <[email protected]> Run-TryBot: Agniva De Sarker <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> (cherry picked from commit c4961dc) Reviewed-on: https://go-review.googlesource.com/c/go/+/232868 Run-TryBot: Dmitri Shuralyov <[email protected]> Reviewed-by: Gregory Petrosyan <[email protected]>
Is there an ETA for https://godoc.org and https://pkg.go.dev updating to 1.14.3? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
@FiloSottile requested issue #38409 to be considered for backport to the next 1.14 minor release.
The text was updated successfully, but these errors were encountered: