From eda20020c3391cf0a9aed04af1c349afbac66f90 Mon Sep 17 00:00:00 2001 From: Anurag Bandyopadhyay Date: Mon, 8 May 2023 10:24:08 +0530 Subject: Removing redundant go-source tag (#92) * update: removing redundant go-source tag * fix: removing /.idea and adding dir to gitignore * fix: removing /.idea and removing branch field from from templateData * fix: pkgHndler defaultBranch rem revert * fix: minor typo * fix: removing assertion of template responses * fix: tabs * Update handler_test.go * Update handler_test.go * Update handler_test.go --------- Co-authored-by: Anuragkillswitch <70265851+Anuragkillswitch@users.noreply.github.com> --- .gitignore | 1 + handler.go | 4 +--- handler_test.go | 5 ----- templates/package.html | 1 - 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 4119fb9..c1eaf47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /bin /cover.out /cover.html +/.idea diff --git a/handler.go b/handler.go index 918405e..aa646c6 100644 --- a/handler.go +++ b/handler.go @@ -50,7 +50,7 @@ type indexHandler struct { type packageInfo struct { Desc string // package description - ImportPath string // canonical improt path + ImportPath string // canonical import path GitURL string // URL of the Git repository GodocHome string // documentation home URL } @@ -119,12 +119,10 @@ func (h *packageHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { data := struct { Repo string - Branch string CanonicalURL string GodocURL string }{ Repo: h.gitURL, - Branch: h.defaultBranch, CanonicalURL: h.canonicalURL, GodocURL: fmt.Sprintf("https://%s/%s%s", h.godocHost, h.canonicalURL, relPath), } diff --git a/handler_test.go b/handler_test.go index 9cb84ff..370eb45 100644 --- a/handler_test.go +++ b/handler_test.go @@ -43,7 +43,6 @@ func TestPackageShouldExist(t *testing.T) { - @@ -67,7 +66,6 @@ func TestTrailingSlash(t *testing.T) { - @@ -84,7 +82,6 @@ func TestDeepImports(t *testing.T) { - @@ -99,7 +96,6 @@ func TestDeepImports(t *testing.T) { - @@ -116,7 +112,6 @@ func TestPackageLevelURL(t *testing.T) { - diff --git a/templates/package.html b/templates/package.html index 293b392..a85ff77 100644 --- a/templates/package.html +++ b/templates/package.html @@ -2,7 +2,6 @@ - -- cgit v1.2.3