Skip to content

client: un-export NewVersionError, rename to requiresVersion#51327

Merged
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:unexport_NewVersionError
Oct 29, 2025
Merged

client: un-export NewVersionError, rename to requiresVersion#51327
austinvazquez merged 1 commit intomoby:masterfrom
thaJeztah:unexport_NewVersionError

Conversation

@thaJeztah
Copy link
Member

- Human readable description for the release notes

- A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 29.0.0 milestone Oct 29, 2025
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code module/client labels Oct 29, 2025
@austinvazquez austinvazquez requested a review from Copilot October 29, 2025 12:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR unexports the NewVersionError method by renaming it to requiresVersion, making it a private method of the client package. This change addresses issue #50968 by preventing external packages from directly calling this internal version-checking utility.

Key changes:

  • Renamed NewVersionError to requiresVersion (lowercase) to make it unexported
  • Updated parameter name from APIrequired to apiRequired to follow Go naming conventions
  • Updated all internal callsites across image-related operations to use the new method name

Reviewed Changes

Copilot reviewed 6 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/errors.go Renames and unexports the version checking method, updates parameter naming to follow conventions
client/image_save.go Updates callsite to use new requiresVersion method name
client/image_push.go Updates callsite to use new requiresVersion method name
client/image_load.go Updates callsite to use new requiresVersion method name
client/image_inspect.go Updates callsites to use new requiresVersion method name
client/image_history.go Updates callsite to use new requiresVersion method name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@austinvazquez austinvazquez merged commit 214cd50 into moby:master Oct 29, 2025
269 of 270 checks passed
@thaJeztah thaJeztah deleted the unexport_NewVersionError branch October 29, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code module/client status/4-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants