Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/website/internal/dl: ?mode=json don't show the SHA1 hash when the SHA256 hash is not available #37586

Closed
perillo opened this issue Feb 29, 2020 · 1 comment
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@perillo
Copy link
Contributor

perillo commented Feb 29, 2020

For releases older than Go 1.6, the SHA256 hash is not available, so the sha256 field in the generated JSON output is empty.
However, the SHA1 hash is available, but is not printed due to

Checksum       string    `json:"-" datastore:",noindex"` // SHA1; deprecated

A possible solution is:

  1. Use the omitempty for both Checksum and ChecksumSHA256 fields
  2. Remove "-" from the Checksum field tag
  3. When ChecksumSHA256 is not empty, set Checksum to the empty string
@gopherbot gopherbot added this to the Unreleased milestone Feb 29, 2020
@dmitshur dmitshur added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 1, 2020
@perillo
Copy link
Contributor Author

perillo commented May 6, 2021

It seems that the SHA1 checksums are not available on https://dl.google.com/go, and instead of adding them #45608 suggests to add the SHA256 checksum to old releases, instead.

@dmitshur, I think that this issue can be closed.

Thanks.

@perillo perillo closed this as completed May 6, 2021
@golang golang locked and limited conversation to collaborators May 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants