Skip to content

Commit

Permalink
Remove per-package ImageOption definitions since they are not useful
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
natalieparellano committed Apr 10, 2024
1 parent f151834 commit 41cd6e4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions layout/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"github.com/buildpacks/imgutil"
)

type ImageOption func(*imgutil.ImageOptions)

// FromBaseImageInstance loads the provided image as the manifest, config, and layers for the working image.
// If the image is not found, it does nothing.
func FromBaseImageInstance(image v1.Image) func(*imgutil.ImageOptions) {
Expand Down
2 changes: 0 additions & 2 deletions local/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"github.com/buildpacks/imgutil"
)

type ImageOption func(o *imgutil.ImageOptions)

// FIXME: the following functions are defined in this package for backwards compatibility,
// and should eventually be deprecated.

Expand Down
2 changes: 0 additions & 2 deletions remote/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"github.com/buildpacks/imgutil"
)

type ImageOption func(o *imgutil.ImageOptions)

// AddEmptyLayerOnSave adds an empty layer before saving if the image has no layers at all.
// This option is useful when exporting to registries that do not allow saving an image without layers,
// for example: gcr.io.
Expand Down

0 comments on commit 41cd6e4

Please sign in to comment.