diff options
author | Runxi Yu <me@runxiyu.org> | 2025-02-10 09:18:42 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-02-10 09:18:42 +0800 |
commit | 3108393b1622b7d5632fa65323ec1be359fd3d9a (patch) | |
tree | f093525b166647381d86be448d1ea18d1cda2dcd /handle_repo_index.go | |
parent | repo_tree: Support listing directories other than / (diff) | |
download | forge-3108393b1622b7d5632fa65323ec1be359fd3d9a.tar.gz forge-3108393b1622b7d5632fa65323ec1be359fd3d9a.tar.zst forge-3108393b1622b7d5632fa65323ec1be359fd3d9a.zip |
*.go: Reformat code
Diffstat (limited to 'handle_repo_index.go')
-rw-r--r-- | handle_repo_index.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/handle_repo_index.go b/handle_repo_index.go index 504853c..ea8aeba 100644 --- a/handle_repo_index.go +++ b/handle_repo_index.go @@ -2,13 +2,14 @@ package main import ( "bytes" + "html/template" + "net/http" + "path/filepath" + "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/object" "github.com/microcosm-cc/bluemonday" "github.com/yuin/goldmark" - "html/template" - "net/http" - "path/filepath" ) func handle_repo_index(w http.ResponseWriter, r *http.Request) { @@ -82,7 +83,7 @@ func handle_repo_index(w http.ResponseWriter, r *http.Request) { if err != nil { display_git_tree_entry.Size = 0 } - display_git_tree_entry.Name = entry.Name + display_git_tree_entry.Name = entry.Name display_git_tree = append(display_git_tree, display_git_tree_entry) } data["files"] = display_git_tree |