-
Notifications
You must be signed in to change notification settings - Fork 18.9k
client: Change ImageHistory, ImageLoad and ImageSave to use variadic functional options
#49466
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
Conversation
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
ImageHistory, ImageLoad and ImageSave to use variadic functional options
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
3f69d14 to
b9319f6
Compare
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
thaJeztah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
@crazy-max PTAL
crazy-max
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM
| } | ||
|
|
||
| // ImageAPIClientDeprecated defines deprecated methods of the ImageAPIClient. | ||
| type ImageAPIClientDeprecated interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vvoland It seems we should have ImageLoad(ctx context.Context, input io.Reader, quiet bool) in ImageAPIClientDeprecated. Can we add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nevermind we can't duplicate ImageLoad method 🙈
To allow us being more flexible when adding new functionality to the client and reduce potential breaking changes to the interface in future, change the signatures of
ImageLoad,ImageHistoryandImageSaveto use variadic functional options, to mirror the same approach asImageInspect.Note: We could change all client functions to follow this approach, but currently this PR only does it for functions which already had a signature change in the
master, but weren't released yet.- How to verify it
CI
- Human readable description for the release notes
- A picture of a cute animal (not mandatory but encouraged)