aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api/handler.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-02-20 22:24:47 +0900
committernsfisis <nsfisis@gmail.com>2026-02-20 22:24:47 +0900
commitaa07ba2e0a40b0097a4f9aee3c06dcbd9a749105 (patch)
tree6b72119152e1dd17ef16703c5b2acb1dfe05c840 /backend/api/handler.go
parent08ae228c45745372784017fe694d61d9ed0e2981 (diff)
downloadphperkaigi-2026-albatross-aa07ba2e0a40b0097a4f9aee3c06dcbd9a749105.tar.gz
phperkaigi-2026-albatross-aa07ba2e0a40b0097a4f9aee3c06dcbd9a749105.tar.zst
phperkaigi-2026-albatross-aa07ba2e0a40b0097a4f9aee3c06dcbd9a749105.zip
style(backend): modernize Go syntax with range-over-int and type inference
Use Go 1.22+ range-over-integer syntax, replace interface{} with any, and remove redundant type parameters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'backend/api/handler.go')
-rw-r--r--backend/api/handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/api/handler.go b/backend/api/handler.go
index 4105efc..8d0d9be 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -554,9 +554,9 @@ func (h *Handler) GetTournament(ctx context.Context, request GetTournamentReques
}
resultByKey := make(map[matchKey]*matchResult)
- for round := 0; round < numRounds; round++ {
+ for round := range numRounds {
numPositions := bracketSize / (1 << (round + 1))
- for pos := 0; pos < numPositions; pos++ {
+ for pos := range numPositions {
m, exists := matchByKey[matchKey{round, pos}]
mr := &matchResult{}