commit | 14c92c5f8032bcc45761e6f1759fa140dc131f76 | [log] [tgz] |
---|---|---|
author | Gregory Petrosyan <gregory.petrosyan@gmail.com> | Sat Apr 04 15:27:23 2020 +0000 |
committer | Dmitri Shuralyov <dmitshur@golang.org> | Mon May 11 14:04:58 2020 +0000 |
tree | 9cdc9a0f492ea87244c14bb2ffc226ad91437b1e | |
parent | f4274e64aac99aaa9af05988f2f8c36c47554889 [diff] |
[release-branch.go1.14] go/doc: fix detection of whole file examples 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: cc71c31124f6e3514f4e33ac7b169eca74c8bcb7 GitHub-Pull-Request: golang/go#37730 Reviewed-on: https://go-review.googlesource.com/c/go/+/222477 Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> (cherry picked from commit c4961dc247ca39c251a5a3c80ebfe59609b4e669) Reviewed-on: https://go-review.googlesource.com/c/go/+/232868 Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Gregory Petrosyan <gregory.petrosyan@gmail.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 3.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://golang.org/dl/.
After downloading a binary release, visit https://golang.org/doc/install or load doc/install.html in your web browser for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://golang.org/doc/install/source or load doc/install-source.html in your web browser for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines: https://golang.org/doc/contribute.html
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://golang.org/wiki/Questions for a list of places to ask questions about the Go language.