Skip to content

Commit e04b0bd

Browse files
committed
fix: use errors.New instead of fmt.Errorf for static string
Replace fmt.Errorf with errors.New for better performance as suggested by perfsprint linter.
1 parent 2aeb966 commit e04b0bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/repo/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ func buildSearchIssuesRepoIDs(ctx *context.APIContext) ([]int64, bool, error) {
8888
}
8989
if ctx.FormString("team") != "" {
9090
if ctx.FormString("owner") == "" {
91-
return nil, false, fmt.Errorf("owner organisation is required for filtering on team")
91+
return nil, false, errors.New("owner organisation is required for filtering on team")
9292
}
9393
team, err := organization.GetTeam(ctx, opts.OwnerID, ctx.FormString("team"))
9494
if err != nil {

0 commit comments

Comments
 (0)