Skip to content

fix deprecation of NewDigestFromHex and Digest.Hex#83

Merged
stevvooe merged 2 commits intoopencontainers:masterfrom
thaJeztah:fix_deprecated_comments
May 25, 2023
Merged

fix deprecation of NewDigestFromHex and Digest.Hex#83
stevvooe merged 2 commits intoopencontainers:masterfrom
thaJeztah:fix_deprecated_comments

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah commented Nov 8, 2022

Both of these were deprecated in 55f6758 (#33), but the format of the GoDoc comments didn't follow the correct format, which causes them not being picked up by tools as "deprecated".

This patch:

  • Fixes the comments to be in the right format.
  • Updates uses in the codebase to use the alternatives.

Also gofmt'd the code (first commit)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Both of these were deprecated in 55f6758, but
the format of the GoDoc comments didn't follow the correct format, which causes
them not being picked up by tools as "deprecated".

This patch:

- Fixes the comments to be in the right format.
- Updates uses in the codebase to use the alternatives.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Copy Markdown
Member Author

@vbatts @AkihiroSuda @stevvooe ptal

// not hex
Input: "sha256:d41d8cd98f00b204e9800m98ecf8427e",
Err: digest. ErrDigestInvalidLength,
Err: digest.ErrDigestInvalidLength,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was surprised this actually worked, but apparently spaces are accepted (TIL!)

@stevvooe stevvooe merged commit 1aab4ea into opencontainers:master May 25, 2023
@thaJeztah thaJeztah deleted the fix_deprecated_comments branch May 25, 2023 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants