Skip to content

Commit

Permalink
Other small cleanups
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Jun 28, 2023
1 parent 84ee822 commit d5cc7d9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/buildpack/buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func Flattened() BlobOption {
type buildModule struct {
descriptor Descriptor
Blob `toml:"-"`
flattened bool
}

func (b *buildModule) Descriptor() Descriptor {
Expand All @@ -86,7 +85,6 @@ func FromBlob(descriptor Descriptor, blob Blob, ops ...BlobOption) BuildModule {
return &buildModule{
Blob: blob,
descriptor: descriptor,
flattened: blobOpts.flattened,
}
}

Expand Down Expand Up @@ -368,7 +366,7 @@ func ToNLayerTar(dest string, module BuildModule) ([]ModuleTar, error) {
header, err = tr.Next()
if err != nil {
if err == io.EOF {
return handleSingleOrEmptyModule(dest, module)
return handleEmptyModule(dest, module)
}
return nil, err
}
Expand Down Expand Up @@ -514,7 +512,7 @@ func parseBpIDAndVersion(hdr *tar.Header) (id, version string) {
return id, version
}

func handleSingleOrEmptyModule(dest string, module BuildModule) ([]ModuleTar, error) {
func handleEmptyModule(dest string, module BuildModule) ([]ModuleTar, error) {
tarFile, err := ToLayerTar(dest, module)
if err != nil {
return nil, err
Expand Down

0 comments on commit d5cc7d9

Please sign in to comment.