aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_raw.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 13:43:49 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 13:43:49 +0800
commitb77e810fce4bd84853fcd5281574f44bcccc23c0 (patch)
tree45d24e086ddcb3b075a0887c731f6a9a825ca354 /http_handle_repo_raw.go
parentHTTP: Avoid an sprintf (diff)
downloadforge-b77e810fce4bd84853fcd5281574f44bcccc23c0.tar.gz
forge-b77e810fce4bd84853fcd5281574f44bcccc23c0.tar.zst
forge-b77e810fce4bd84853fcd5281574f44bcccc23c0.zip
HTTP: Use range in for loops over integers
Diffstat (limited to 'http_handle_repo_raw.go')
-rw-r--r--http_handle_repo_raw.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go
index e6e8c9a..835dd1b 100644
--- a/http_handle_repo_raw.go
+++ b/http_handle_repo_raw.go
@@ -76,7 +76,7 @@ func httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params
}
files := make([]displayTreeEntry, 0, count)
- for i := uint64(0); i < count; i++ {
+ for range count {
typeCode, err := brReader.ReadUint()
if err != nil {
errorPage500(writer, params, "error reading entry type: "+err.Error())