commit | 103cc661f1906837d02133e9c65d0475ac49799c | [log] [tgz] |
---|---|---|
author | Josh Powers <jpowers@influxdata.com> | Fri Jun 17 18:22:12 2022 +0000 |
committer | Gopher Robot <gobot@golang.org> | Fri Jun 17 21:38:40 2022 +0000 |
tree | d4e80042e01086a8fd0393bb5b184b0ecbc06b31 | |
parent | d42a48828f3cff4e57cefaf72bc88cef7d355fd6 [diff] |
cmd/go/internal/modfetch: prevent duplicate hashes in go.sum To write go.sum, each module and then each hash is looped through. The hashes are kept in a slice and there is no check to ensure that hashes were not added or already exist in the file. Therefore, unique the hashes of each module before writing to prevent duplicates. Fixes: #28456 Change-Id: I1cf7e7cdee3e7530a0ee605cd76d738627be1e0d GitHub-Last-Rev: 0ed02e9591e966fe5f6ba275635c3974daa2656e GitHub-Pull-Request: golang/go#53291 Reviewed-on: https://go-review.googlesource.com/c/go/+/411154 Auto-Submit: Bryan Mills <bcmills@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@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://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.