fix: Omit comparison with boolean constant (S1002)

Reported by staticcheck

Signed-off-by: Loïc Minier <loic.minier@oss.qualcomm.com>
This commit is contained in:
Loïc Minier
2025-08-25 19:40:55 +00:00
committed by Dylan Aïssi
parent be75ca645e
commit 16ab444c53
4 changed files with 6 additions and 6 deletions

View File

@@ -115,7 +115,7 @@ func (d *DownloadAction) Verify(context *debos.DebosContext) error {
if err != nil {
return err
}
if d.Unpack == true {
if d.Unpack {
if _, err := d.archive(filename); err != nil {
return err
}
@@ -147,7 +147,7 @@ func (d *DownloadAction) Run(context *debos.DebosContext) error {
return fmt.Errorf("unsupported URL provided: '%s'", url.String())
}
if d.Unpack == true {
if d.Unpack {
archive, err := d.archive(filename)
if err != nil {
return err

View File

@@ -274,7 +274,7 @@ func (i *ImagePartitionAction) generateFSTab(context *debos.DebosContext) error
for _, m := range i.Mountpoints {
options := []string{"defaults"}
options = append(options, m.Options...)
if m.Buildtime == true {
if m.Buildtime {
/* Do not need to add mount point into fstab */
continue
}
@@ -714,7 +714,7 @@ func (i ImagePartitionAction) Cleanup(context *debos.DebosContext) error {
log.Printf("Unmount failure can cause images being incomplete!")
return err
}
if m.Buildtime == true {
if m.Buildtime {
if err = os.Remove(mntpath); err != nil {
log.Printf("Failed to remove temporary mount point %s: %s", m.Mountpoint, err)

View File

@@ -85,7 +85,7 @@ func (pf *PackAction) Run(context *debos.DebosContext) error {
command = append(command, outfile)
command = append(command, "--xattrs")
command = append(command, "--xattrs-include=*.*")
if usePigz == true {
if usePigz {
command = append(command, "--use-compress-program=pigz")
} else if tarOpts[pf.Compression] != "" {
command = append(command, tarOpts[pf.Compression])

View File

@@ -115,7 +115,7 @@ func (tar *ArchiveTar) Unpack(destination string) error {
if compression, ok := tar.options["tarcompression"]; ok {
if unpackTarOpt := tarOptions(compression.(string)); len(unpackTarOpt) > 0 {
if usePigz == true {
if usePigz {
command = append(command, "--use-compress-program=pigz")
} else {
command = append(command, unpackTarOpt)