Skip to content

Commit

Permalink
chore: address more PR feedback
Browse files Browse the repository at this point in the history
Signed-off-by: Keith Zantow <[email protected]>
  • Loading branch information
kzantow committed Feb 9, 2024
1 parent 4ea370f commit d809cb4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
go-version:
description: "Go version to install"
required: true
default: "1.20.x"
default: "1.21.x"
use-go-cache:
description: "Restore go cache"
required: true
Expand Down
9 changes: 8 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,18 @@ func WithPlatform(platform string) Option {
// GetImage parses the user provided image string and provides an image object;
// note: the source where the image should be referenced from is automatically inferred.
func GetImage(ctx context.Context, imgStr string, options ...Option) (*image.Image, error) {
return GetImageFromSource(ctx, imgStr, "", options...)
return getImageFromSource(ctx, imgStr, "", options...)
}

// GetImageFromSource returns an image from the explicitly provided source.
func GetImageFromSource(ctx context.Context, imgStr string, source image.Source, options ...Option) (*image.Image, error) {
if source == "" {
return nil, fmt.Errorf("source not provided, please specify a valid source tag")
}
return getImageFromSource(ctx, imgStr, source, options...)
}

func getImageFromSource(ctx context.Context, imgStr string, source image.Source, options ...Option) (*image.Image, error) {
log.Debugf("image: source=%+v location=%+v", source, imgStr)

// apply ImageProviderConfig config
Expand Down

0 comments on commit d809cb4

Please sign in to comment.