commit | aa476ba6f43ebc4e7ddb6599a7ad35d9fbf1ec6d | [log] [tgz] |
---|---|---|
author | Bryan C. Mills <bcmills@google.com> | Tue Sep 01 00:34:03 2020 -0400 |
committer | Bryan C. Mills <bcmills@google.com> | Wed Sep 09 22:39:28 2020 +0000 |
tree | 9c62dea31b0a95147040a8084f51765feefc0791 | |
parent | 564b350c08a1906e8f6a876fef4cca71f6516d4c [diff] |
cmd/go/internal/modload: refactor pathInModuleCache I found the control flow of this function a bit tricky to reason about due to nesting and interaction between conditions and iteration. This change factors out a helper function that can return early instead of mixing conditionals and 'continue' statements. Also remove the (unused) ModuleUsedDirectly function. For #36460 Change-Id: I60a2a5a1b32989e5a17a14e1a8c858b280cda8f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/251998 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Reviewed-by: Michael Matloob <matloob@golang.org>
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.