Skip to content

Commit 6ffdd3b

Browse files
committed
fix: when not formatting, create a new error
Latest go checks for unneeded Errorf calls - constant strings.
1 parent aa44e95 commit 6ffdd3b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/pkg/ubuntu.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ func (pkg *UbuntuPackage) pullLaunchpadDdeb(ctx context.Context, dir string, des
177177

178178
errline := stderr.String()
179179
if len(errline) > 0 {
180-
return fmt.Errorf(strings.TrimSpace(errline))
180+
return errors.New(strings.TrimSpace(errline))
181181
}
182182

183-
return fmt.Errorf("download path not found in pull-lp-ddebs output")
183+
return errors.New("download path not found in pull-lp-ddebs output")
184184
}

pkg/utils/rpm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,5 +108,5 @@ func ExtractVmlinuxFromRPM(ctx context.Context, rpmPath string, vmlinuxPath stri
108108
return nil
109109
}
110110
}
111-
return fmt.Errorf("vmlinux file not found in rpm")
111+
return errors.New("vmlinux file not found in rpm")
112112
}

0 commit comments

Comments
 (0)