diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-08-09 20:08:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 14:08:51 -0400 |
commit | d9ef43a7126ab83af563c1c9b54cdf0092327b2a (patch) | |
tree | fabc9a9d24d42bb0de6dd9557c9e07e95bd5722b /models/pull_sign.go | |
parent | 23d438f56524a7c3fc185df66d6d95f797a80eee (diff) | |
download | gitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.tar.gz gitea-d9ef43a7126ab83af563c1c9b54cdf0092327b2a.zip |
Replace `list.List` with slices (#16311)
* Replaced list with slice.
* Fixed usage of pointer to temporary variable.
* Replaced LIFO list with slice.
* Lint
* Removed type check.
* Removed duplicated code.
* Lint
* Fixed merge.
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'models/pull_sign.go')
-rw-r--r-- | models/pull_sign.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/models/pull_sign.go b/models/pull_sign.go index 10a6522ebe..e7cf4ab666 100644 --- a/models/pull_sign.go +++ b/models/pull_sign.go @@ -118,8 +118,7 @@ Loop: if err != nil { return false, "", nil, err } - for e := commitList.Front(); e != nil; e = e.Next() { - commit = e.Value.(*git.Commit) + for _, commit := range commitList { verification := ParseCommitWithSignature(commit) if !verification.Verified { return false, "", nil, &ErrWontSign{commitsSigned} |