diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-27 23:32:00 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-27 23:32:00 +0800 |
commit | 4cf0fec12f3596cc17d313db3be4d46b91ef9862 (patch) | |
tree | 7151374cd880f7b9154e51f1eb02411e09cfc8cc /http_handle_repo_tree.go | |
parent | Fix out of bounds in commit path handling (diff) | |
download | forge-4cf0fec12f3596cc17d313db3be4d46b91ef9862.tar.gz forge-4cf0fec12f3596cc17d313db3be4d46b91ef9862.tar.zst forge-4cf0fec12f3596cc17d313db3be4d46b91ef9862.zip |
Lint
Diffstat (limited to 'http_handle_repo_tree.go')
-rw-r--r-- | http_handle_repo_tree.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/http_handle_repo_tree.go b/http_handle_repo_tree.go index 38b533d..7d95c02 100644 --- a/http_handle_repo_tree.go +++ b/http_handle_repo_tree.go @@ -5,7 +5,6 @@ package main import ( "bytes" - "fmt" "html/template" "net/http" "path" @@ -42,8 +41,6 @@ func httpHandleRepoTree(writer http.ResponseWriter, request *http.Request, param cacheHandle := append(refHashSlice, []byte(pathSpec)...) - fmt.Printf("%#v\n", string(cacheHandle)) - if value, found := treeReadmeCache.Get(cacheHandle); found { params["files"] = value.DisplayTree params["readme_filename"] = value.ReadmeFilename @@ -59,8 +56,6 @@ func httpHandleRepoTree(writer http.ResponseWriter, request *http.Request, param } start := time.Now() - fmt.Println("miss") - var target *object.Tree if pathSpec == "" { if commitObject, err = repo.CommitObject(refHash); err != nil { @@ -159,7 +154,7 @@ func httpHandleRepoTree(writer http.ResponseWriter, request *http.Request, param ReadmeFilename: readmeFilename, ReadmeRendered: readmeRendered, } - fmt.Println(treeReadmeCache.Set(cacheHandle, entry, cost)) + treeReadmeCache.Set(cacheHandle, entry, cost) params["readme_filename"], params["readme"] = readmeFilename, readmeRendered params["files"] = displayTree |