Changes
5 changed files (+7/-7)
-
-
@@ -136,7 +136,7 @@ func main() {templatesDir = embed.TemplatesDir() } mux := routes.Handlers(c, staticDir, templatesDir) mux := routes.Handler(c, staticDir, templatesDir) addr := fmt.Sprintf("%s:%d", c.Server.Host, c.Server.Port) log.Println("starting server on", addr) log.Fatal(http.ListenAndServe(addr, mux))
-
-
-
@@ -54,7 +54,7 @@ func TestGitCloneOK(t *testing.T) {c.Repo.Readme = []string{"README.md"} c.Repo.MainBranch = []string{"trunk"} server := httptest.NewServer(Handlers(&c, embed.StaticDir(), embed.TemplatesDir())) server := httptest.NewServer(Handler(&c, embed.StaticDir(), embed.TemplatesDir())) defer server.Close() cloneURL, err := url.JoinPath(server.URL, "/foo")
-
@@ -129,7 +129,7 @@ I'm [Markdown](https://commonmark.org/) file for *load* **testing**.c.Repo.Readme = []string{"README.md"} c.Repo.MainBranch = []string{"trunk"} server := httptest.NewServer(Handlers(&c, embed.StaticDir(), embed.TemplatesDir())) server := httptest.NewServer(Handler(&c, embed.StaticDir(), embed.TemplatesDir())) defer server.Close() cloneURL, err := url.JoinPath(server.URL, "/foo.git")
-
@@ -204,7 +204,7 @@ func TestCloneRespectVisibilityConfig(t *testing.T) {c.Repo.Ignore = []string{"ignored.git"} c.Repo.Unlisted = []string{"unlisted.git"} server := httptest.NewServer(Handlers(&c, embed.StaticDir(), embed.TemplatesDir())) server := httptest.NewServer(Handler(&c, embed.StaticDir(), embed.TemplatesDir())) defer server.Close() publicUrl, err := url.JoinPath(server.URL, "/public.git")
-
-
-
@@ -39,7 +39,7 @@ func (d *deps) Multiplex(w http.ResponseWriter, r *http.Request) {} } func Handlers(c *config.Config, staticDir fs.FS, templatesDir fs.FS) *http.ServeMux { func Handler(c *config.Config, staticDir fs.FS, templatesDir fs.FS) *http.ServeMux { mux := http.NewServeMux() ugcPolicy := bluemonday.UGCPolicy()
-
-
-
@@ -58,7 +58,7 @@ func TestIgnoreSymlinkByDefault(t *testing.T) {c.Repo.Readme = []string{"README.md"} c.Repo.MainBranch = []string{"trunk"} server := httptest.NewServer(Handlers(&c, embed.StaticDir(), embed.TemplatesDir())) server := httptest.NewServer(Handler(&c, embed.StaticDir(), embed.TemplatesDir())) defer server.Close() topPage, err := http.Get(server.URL)
-
-
-
@@ -52,7 +52,7 @@ func TestGetSummaryOK(t *testing.T) {c.Repo.Readme = []string{"README.md"} c.Repo.MainBranch = []string{"trunk"} server := httptest.NewServer(Handlers(&c, embed.StaticDir(), embed.TemplatesDir())) server := httptest.NewServer(Handler(&c, embed.StaticDir(), embed.TemplatesDir())) defer server.Close() target, err := url.JoinPath(server.URL, "/foo")
-