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

Use print instead of printf (#27093)

A bit more performant when we only use it for appending strings.
This commit is contained in:
KN4CK3R
2023-09-16 05:51:54 +02:00
committed by GitHub
parent 7cdbe65a2c
commit f3f445862e
7 changed files with 23 additions and 23 deletions

View File

@@ -17,17 +17,17 @@
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses "root" $.root}}
{{$class := "ui sha label"}}
{{if .Signature}}
{{$class = (printf "%s%s" $class " isSigned")}}
{{$class = (print $class " isSigned")}}
{{if .Verification.Verified}}
{{if eq .Verification.TrustStatus "trusted"}}
{{$class = (printf "%s%s" $class " isVerified")}}
{{$class = (print $class " isVerified")}}
{{else if eq .Verification.TrustStatus "untrusted"}}
{{$class = (printf "%s%s" $class " isVerifiedUntrusted")}}
{{$class = (print $class " isVerifiedUntrusted")}}
{{else}}
{{$class = (printf "%s%s" $class " isVerifiedUnmatched")}}
{{$class = (print $class " isVerifiedUnmatched")}}
{{end}}
{{else if .Verification.Warning}}
{{$class = (printf "%s%s" $class " isWarning")}}
{{$class = (print $class " isWarning")}}
{{end}}
{{end}}
<a href="{{$commitLink}}" rel="nofollow" class="gt-ml-3 {{$class}}">