1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-01 15:18:37 +00:00

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>
This commit is contained in:
KN4CK3R
2021-08-09 20:08:51 +02:00
committed by GitHub
parent 23d438f565
commit d9ef43a712
29 changed files with 183 additions and 302 deletions

View File

@@ -1,7 +1,6 @@
{{ $r:= List .comment.Commits}}
{{ $index := 0}}
<div class="timeline-item commits-list">
{{range $r}}
{{range .comment.Commits}}
{{ $tag := printf "%s-%d" $.comment.HashTag $index }}
{{ $index = Add $index 1}}
<div class="singular-commit" id="{{$tag}}">
@@ -15,9 +14,7 @@
{{end}}
<span class="ui float right shabox">
{{if eq (CommitType .) "SignCommitWithStatuses"}}
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
{{end}}
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
{{$class := "ui sha label"}}
{{if .Signature}}
{{$class = (printf "%s%s" $class " isSigned")}}