Move content.Fetch configuration to struct
This makes it easier for callers to call this function and populate the config without relying on specific flags across commands. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -73,7 +73,11 @@ command. As part of this process, we do the following:
|
||||
}
|
||||
defer done(ctx)
|
||||
|
||||
img, err := content.Fetch(ctx, client, ref, context)
|
||||
config, err := content.NewFetchConfig(ctx, context)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
img, err := content.Fetch(ctx, client, ref, config)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Reference in New Issue
Block a user