Skip to content

Commit

Permalink
all: remove unnecessary use of fmt.Sprintf
Browse files Browse the repository at this point in the history
Found via staticcheck S1039. Thanks @dominikh.
  • Loading branch information
dmitshur committed Feb 18, 2020
1 parent 7b0f8ee commit a589cb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/githook/pre-receive/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ func verifyHasLICENSE(r vcs.Repository, commitID vcs.CommitID) error {
}
fi, err := fs.Stat("/LICENSE")
if os.IsNotExist(err) {
return BadVersionError{fmt.Sprintf("commit does not have a LICENSE file")}
return BadVersionError{"commit does not have a LICENSE file"}
} else if err != nil {
return err
}
if !fi.Mode().IsRegular() {
return BadVersionError{fmt.Sprintf("commit has a LICENSE but it's not a regular file")}
return BadVersionError{"commit has a LICENSE but it's not a regular file"}
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/exp/service/activity/github/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func ghListNotificationsAllPages(ctx context.Context, cl *githubv3.Client, opt *
// ghListNotifications is like githubv3.Client.Activity.ListNotifications,
// but gives caller control over whether cache can be used.
func ghListNotifications(ctx context.Context, cl *githubv3.Client, opt *githubv3.NotificationListOptions, cache bool) ([]*githubv3.Notification, *githubv3.Response, error) {
u := fmt.Sprintf("notifications")
u := "notifications"
u, err := ghAddOptions(u, opt)
if err != nil {
return nil, nil, err
Expand Down

0 comments on commit a589cb3

Please sign in to comment.