commit | 5f00ce86334aa7e80ab825882db1a080f1b56404 | [log] [tgz] |
---|---|---|
author | Bryan C. Mills <bcmills@google.com> | Fri Jan 20 16:25:33 2023 -0500 |
committer | Gopher Robot <gobot@golang.org> | Tue Jan 31 20:33:02 2023 +0000 |
tree | aea0f001cf2164b02a27cda9449d17d356c13a2a | |
parent | de2efc2aa1448cfcf28fec66ce0ff3f979fc2f12 [diff] |
cmd/go: use Join functions instead of adding path separators to strings Adding a file path separator is incorrect for a file path that may be the root directory on a Unix platform (such as in a container or chroot). Adding a path separator is incorrect for a package path prefix that may be the empty string (as in the "std" module in GOROOT/src). And in both cases, a Join function is arguably clearer and simpler anyway. Fixes #51506 (maybe). Change-Id: Id816930811ad5e4d1fbd206cddf219ecd4ad39a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/463178 Reviewed-by: Russ Cox <rsc@golang.org> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.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 4.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://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.