client: un-export NewVersionError, rename to requiresVersion#51327
Merged
austinvazquez merged 1 commit intomoby:masterfrom Oct 29, 2025
Merged
client: un-export NewVersionError, rename to requiresVersion#51327austinvazquez merged 1 commit intomoby:masterfrom
austinvazquez merged 1 commit intomoby:masterfrom
Conversation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
7 tasks
There was a problem hiding this comment.
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
NewVersionErrortorequiresVersion(lowercase) to make it unexported - Updated parameter name from
APIrequiredtoapiRequiredto 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
approved these changes
Oct 29, 2025
vvoland
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)