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

Consolidate image options in imgutil package #263

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

natalieparellano
Copy link
Member

@natalieparellano natalieparellano commented Apr 10, 2024

It is really annoying in the lifecycle to have to construct the same list of options 3 times, once for local/remote/layout. By moving the options into the imgutil package, we can simplify the calling code.

Signed-off-by: Natalie Arellano <narellano@vmware.com>
Previous commits changed function signatures like
func NewImage(repoName string, dockerClient DockerClient, ops ...imgutil.ImageOption) (*Image, error)
to expect imgutil.ImageOption instead of remote.ImageOption or whatever

imgutil.ImageOption and remote.ImageOption are interchangeable when passed into the function
but the signature needs a specific type

Signed-off-by: Natalie Arellano <narellano@vmware.com>
@natalieparellano natalieparellano changed the title WIP: consolidate image options in imgutil package Consolidate image options in imgutil package Apr 11, 2024
@natalieparellano natalieparellano marked this pull request as ready for review April 11, 2024 15:41
@natalieparellano natalieparellano requested a review from a team as a code owner April 11, 2024 15:41
@natalieparellano natalieparellano merged commit 9478f0a into main Apr 11, 2024
3 checks passed
@natalieparellano natalieparellano deleted the fix/local-options branch April 11, 2024 20:20
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.

2 participants