aboutsummaryrefslogtreecommitdiff
path: root/http_handle_repo_raw.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-04-05 20:52:04 +0800
committerRunxi Yu <me@runxiyu.org>2025-04-05 20:52:04 +0800
commitb4b0d966340ad9c892f8b8912eebc6118eed7482 (patch)
tree0512a6dd5cfc21fbd91a07d31f972aa2a1cf844d /http_handle_repo_raw.go
parentgit2c: git2c.go -> client.go, a more sensible name (diff)
downloadforge-b4b0d966340ad9c892f8b8912eebc6118eed7482.tar.gz
forge-b4b0d966340ad9c892f8b8912eebc6118eed7482.tar.zst
forge-b4b0d966340ad9c892f8b8912eebc6118eed7482.zip
Use cmd/forge for the entry point
Diffstat (limited to 'http_handle_repo_raw.go')
-rw-r--r--http_handle_repo_raw.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/http_handle_repo_raw.go b/http_handle_repo_raw.go
index 570030f..7e19e02 100644
--- a/http_handle_repo_raw.go
+++ b/http_handle_repo_raw.go
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>
-package main
+package forge
import (
"fmt"
@@ -15,7 +15,7 @@ import (
// httpHandleRepoRaw serves raw files, or directory listings that point to raw
// files.
-func (s *server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params map[string]any) {
+func (s *Server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Request, params map[string]any) {
repoName := params["repo_name"].(string)
groupPath := params["group_path"].([]string)
rawPathSpec := params["rest"].(string)
@@ -24,7 +24,7 @@ func (s *server) httpHandleRepoRaw(writer http.ResponseWriter, request *http.Req
_, repoPath, _, _, _, _, _ := s.getRepoInfo(request.Context(), groupPath, repoName, "")
- client, err := git2c.NewClient(s.config.Git.Socket)
+ client, err := git2c.NewClient(s.Config.Git.Socket)
if err != nil {
errorPage500(writer, params, err.Error())
return