|author||Hana Kim <firstname.lastname@example.org>||Mon Jan 14 11:13:34 2019 -0500|
|committer||Andrew Bonventre <email@example.com>||Wed Mar 13 21:18:41 2019 +0000|
[release-branch.go1.12] cmd/go: fix the default build output name for versioned binaries `go build` has chosen the last element of the package import path as the default output name when -o option is given. That caused the output of a package build when the module root is the major version component such as 'v2'. A similar issue involving `go install` was fixed in https://golang.org/cl/128900. This CL refactors the logic added with the change and makes it available as internal/load.DefaultExecName. This CL makes 'go test' to choose the right default test binary name when the tested package is in the module root. (E.g., instead of v2.test, choose pkg.test for the test of 'path/pkg/v2') Fixes #27283 Fixes #30266 Change-Id: I6905754f0906db46e3ce069552715f45356913ae Reviewed-on: https://go-review.googlesource.com/c/go/+/140863 Reviewed-by: Bryan C. Mills <firstname.lastname@example.org> (cherry picked from commit bf94fc3ae387fc09929443393741919fac6727af) Reviewed-on: https://go-review.googlesource.com/c/go/+/167384 Run-TryBot: Brad Fitzpatrick <email@example.com> Reviewed-by: Brad Fitzpatrick <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
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/.
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.