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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 23 deletions

View file

@ -4,17 +4,17 @@
<div class="ui container fluid padded">
{{$class := ""}}
{{if .Commit.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}}
<div class="ui top attached header clearing segment gt-relative commit-header {{$class}}">