From b4b0d966340ad9c892f8b8912eebc6118eed7482 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 20:52:04 +0800 Subject: Use cmd/forge for the entry point --- http_handle_repo_index.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'http_handle_repo_index.go') diff --git a/http_handle_repo_index.go b/http_handle_repo_index.go index c6338cf..edba57b 100644 --- a/http_handle_repo_index.go +++ b/http_handle_repo_index.go @@ -1,7 +1,7 @@ // SPDX-License-Identifier: AGPL-3.0-only // SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu -package main +package forge import ( "net/http" @@ -19,13 +19,13 @@ type commitDisplay struct { } // httpHandleRepoIndex provides the front page of a repo using git2d. -func (s *server) httpHandleRepoIndex(w http.ResponseWriter, req *http.Request, params map[string]any) { +func (s *Server) httpHandleRepoIndex(w http.ResponseWriter, req *http.Request, params map[string]any) { repoName := params["repo_name"].(string) groupPath := params["group_path"].([]string) _, repoPath, _, _, _, _, _ := s.getRepoInfo(req.Context(), groupPath, repoName, "") // TODO: Don't use getRepoInfo - client, err := git2c.NewClient(s.config.Git.Socket) + client, err := git2c.NewClient(s.Config.Git.Socket) if err != nil { errorPage500(w, params, err.Error()) return -- cgit v1.2.3