aboutsummaryrefslogtreecommitdiffstats
path: root/services/repository/commitstatus/commitstatus.go
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2025-06-18 03:48:09 +0200
committerGitHub <noreply@github.com>2025-06-18 01:48:09 +0000
commit1f35435b81f272d8d8dfed4ab5d319f1676c7a54 (patch)
treec314774938fbad07a9426e6c4c82033daf90c87e /services/repository/commitstatus/commitstatus.go
parent71e4740946ef652e06cd078cea1c8bc67fa7d64d (diff)
downloadgitea-1f35435b81f272d8d8dfed4ab5d319f1676c7a54.tar.gz
gitea-1f35435b81f272d8d8dfed4ab5d319f1676c7a54.zip
Run `gopls modernize` on codebase (#34751)
Recent modernize fixes: https://github.com/golang/tools/commits/master/gopls/internal/analysis/modernize
Diffstat (limited to 'services/repository/commitstatus/commitstatus.go')
-rw-r--r--services/repository/commitstatus/commitstatus.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/commitstatus/commitstatus.go b/services/repository/commitstatus/commitstatus.go
index 44cf61df43..fa7a89882a 100644
--- a/services/repository/commitstatus/commitstatus.go
+++ b/services/repository/commitstatus/commitstatus.go
@@ -24,7 +24,7 @@ import (
)
func getCacheKey(repoID int64, brancheName string) string {
- hashBytes := sha256.Sum256([]byte(fmt.Sprintf("%d:%s", repoID, brancheName)))
+ hashBytes := sha256.Sum256(fmt.Appendf(nil, "%d:%s", repoID, brancheName))
return fmt.Sprintf("commit_status:%x", hashBytes)
}