Skip to content

Commit

Permalink
models: break out of loop (go-gitea#12386)
Browse files Browse the repository at this point in the history
  • Loading branch information
alrs authored Jul 31, 2020
1 parent 11dcc17 commit e4d6f2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion models/pull_sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ func (pr *PullRequest) SignMerge(u *User, tmpBasePath, baseCommit, headCommit st
var gitRepo *git.Repository
var err error

Loop:
for _, rule := range rules {
switch rule {
case never:
return false, "", &ErrWontSign{never}
case always:
break
break Loop
case pubkey:
keys, err := ListGPGKeys(u.ID, ListOptions{})
if err != nil {
Expand Down

0 comments on commit e4d6f2e

Please sign in to comment.