Skip to content

Commit

Permalink
method receivers of consistently named and typed
Browse files Browse the repository at this point in the history
  • Loading branch information
aramprice committed Jul 18, 2024
1 parent 08a8f39 commit 7a5aa1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions package_stemcell/packagers/vmdk_packager.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ func (c *VmdkPackager) catchInterruptSignal() {
}
}

func (c VmdkPackager) Package() error {
func (c *VmdkPackager) Package() error {

go c.catchInterruptSignal()

Expand All @@ -382,7 +382,7 @@ func (c VmdkPackager) Package() error {
return nil
}

func (c VmdkPackager) ValidateSourceParameters() error {
func (c *VmdkPackager) ValidateSourceParameters() error {
if validVMDK, err := IsValidVMDK(c.BuildOptions.VMDKFile); err != nil {
return err
} else if !validVMDK {
Expand Down Expand Up @@ -411,8 +411,8 @@ func IsValidVMDK(vmdk string) (bool, error) {
return true, nil
}

func (p VmdkPackager) ValidateFreeSpaceForPackage(fs filesystem.FileSystem) error {
fi, err := os.Stat(p.BuildOptions.VMDKFile)
func (c *VmdkPackager) ValidateFreeSpaceForPackage(fs filesystem.FileSystem) error {
fi, err := os.Stat(c.BuildOptions.VMDKFile)
if err != nil {
errorMsg := fmt.Sprintf("could not get vmdk info: %s", err)
return errors.New(errorMsg)
Expand All @@ -424,7 +424,7 @@ func (p VmdkPackager) ValidateFreeSpaceForPackage(fs filesystem.FileSystem) erro

minSpace := uint64(vmdkSize)*2 + (Gigabyte / 2)

enoughSpace, requiredSpace, err := hasAtLeastFreeDiskSpace(minSpace, fs, filepath.Dir(p.BuildOptions.VMDKFile))
enoughSpace, requiredSpace, err := hasAtLeastFreeDiskSpace(minSpace, fs, filepath.Dir(c.BuildOptions.VMDKFile))
if err != nil {
errorMsg := fmt.Sprintf("could not check free space on disk: %s", err)
return errors.New(errorMsg)
Expand Down

0 comments on commit 7a5aa1d

Please sign in to comment.