Skip to content

Commit

Permalink
Change to using pointers
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Mikusa <[email protected]>
  • Loading branch information
dmikusa committed Mar 1, 2024
1 parent 8ed64b2 commit bc9ac69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packager/buildpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (p *BundleBuildpack) InferBuildpackVersion() error {
}

// CleanUpDockerImages removes dangling docker images created by the build process
func (p BundleBuildpack) CleanUpDockerImages() error {
func (p *BundleBuildpack) CleanUpDockerImages() error {
buf := &bytes.Buffer{}
err := p.executor.Execute(effect.Execution{
Command: "docker",
Expand Down Expand Up @@ -167,7 +167,7 @@ func (p BundleBuildpack) CleanUpDockerImages() error {
}

// ExecutePackage runs the package buildpack command
func (p BundleBuildpack) ExecutePackage(tmpDir string) error {
func (p *BundleBuildpack) ExecutePackage(tmpDir string) error {
pullPolicy, found := os.LookupEnv("BP_PULL_POLICY")
if !found {
pullPolicy = "if-not-present"
Expand All @@ -193,7 +193,7 @@ func (p BundleBuildpack) ExecutePackage(tmpDir string) error {
}

// CompilePackage compiles the buildpack's Go code
func (p BundleBuildpack) CompilePackage(tmpDir string) {
func (p *BundleBuildpack) CompilePackage(tmpDir string) {
pkg := carton.Package{}
pkg.Source = p.BuildpackPath
pkg.Version = p.BuildpackVersion
Expand All @@ -213,7 +213,7 @@ func (p BundleBuildpack) CompilePackage(tmpDir string) {
}

// Execute runs the package buildpack command
func (p BundleBuildpack) Execute() error {
func (p *BundleBuildpack) Execute() error {
tmpDir, err := os.MkdirTemp("", "BundleBuildpack")
if err != nil {
return fmt.Errorf("unable to create temporary directory\n%w", err)
Expand Down

0 comments on commit bc9ac69

Please sign in to comment.