Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaczanowski committed Nov 19, 2019
1 parent a097a99 commit 8508546
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion builder/step_extract_and_copy_image.go
Expand Up @@ -15,7 +15,7 @@ import (
cfg "github.com/mkaczanowski/packer-builder-arm/config"
)

// StepExtractAndCopyImage.go creates filesystem on already partitioned image
// StepExtractAndCopyImage creates filesystem on already partitioned image
type StepExtractAndCopyImage struct {
FromKey string
}
Expand Down
2 changes: 1 addition & 1 deletion builder/step_setup_chroot.go
Expand Up @@ -66,7 +66,7 @@ func getMounts() (map[string]bool, error) {
return selected, nil
}

// StepSetupChroot prepares chroot enviroment by mounting specific locations (/dev /proc etc.)
// StepSetupChroot prepares chroot environment by mounting specific locations (/dev /proc etc.)
type StepSetupChroot struct {
ImageMountPointKey string
}
Expand Down
2 changes: 1 addition & 1 deletion builder/step_setup_extra.go
Expand Up @@ -25,7 +25,7 @@ func replaceVars(l []string, config *cfg.Config, imageMountpoint string) []strin
}

for i, v := range l {
for key, _ := range defined {
for key := range defined {
v = strings.ReplaceAll(v, key, defined[key])
}
newList[i] = v
Expand Down
10 changes: 5 additions & 5 deletions config/image_config.go
Expand Up @@ -89,11 +89,11 @@ func (c *ImageConfig) Prepare(ctx *interpolate.Context) (warnings []string, errs

if len(c.ImageChrootMounts) == 0 {
c.ImageChrootMounts = []ChrootMount{
ChrootMount{MountType: "proc", SourcePath: "proc", DestinationPath: "/proc"},
ChrootMount{MountType: "sysfs", SourcePath: "sysfs", DestinationPath: "/sys"},
ChrootMount{MountType: "bind", SourcePath: "/dev", DestinationPath: "/dev"},
ChrootMount{MountType: "devpts", SourcePath: "/devpts", DestinationPath: "/dev/pts"},
ChrootMount{MountType: "binfmt_misc", SourcePath: "binfmt_misc", DestinationPath: "/proc/sys/fs/binfmt_misc"},
{MountType: "proc", SourcePath: "proc", DestinationPath: "/proc"},
{MountType: "sysfs", SourcePath: "sysfs", DestinationPath: "/sys"},
{MountType: "bind", SourcePath: "/dev", DestinationPath: "/dev"},
{MountType: "devpts", SourcePath: "/devpts", DestinationPath: "/dev/pts"},
{MountType: "binfmt_misc", SourcePath: "binfmt_misc", DestinationPath: "/proc/sys/fs/binfmt_misc"},
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/remote_file_config.go
Expand Up @@ -37,7 +37,7 @@ func (c *RemoteFileConfig) Prepare(ctx *interpolate.Context) (warnings []string,
}

// prevent auto-decompress
for i, _ := range c.FileUrls {
for i := range c.FileUrls {
u, err := url.Parse(c.FileUrls[i])
if err != nil {
errs = append(errs, err)
Expand Down

0 comments on commit 8508546

Please sign in to comment.