diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | handler.go | 4 | ||||
-rw-r--r-- | handler_test.go | 5 | ||||
-rw-r--r-- | templates/package.html | 1 |
4 files changed, 2 insertions, 9 deletions
@@ -1,3 +1,4 @@ /bin /cover.out /cover.html +/.idea @@ -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) { <html> <head> <meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go"> - <meta name="go-source" content="go.uber.org/yarpc https://github.com/yarpc/yarpc-go https://github.com/yarpc/yarpc-go/tree/master{/dir} https://github.com/yarpc/yarpc-go/tree/master{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc"> </head> <body> @@ -67,7 +66,6 @@ func TestTrailingSlash(t *testing.T) { <html> <head> <meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go"> - <meta name="go-source" content="go.uber.org/yarpc https://github.com/yarpc/yarpc-go https://github.com/yarpc/yarpc-go/tree/master{/dir} https://github.com/yarpc/yarpc-go/tree/master{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/"> </head> <body> @@ -84,7 +82,6 @@ func TestDeepImports(t *testing.T) { <html> <head> <meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go"> - <meta name="go-source" content="go.uber.org/yarpc https://github.com/yarpc/yarpc-go https://github.com/yarpc/yarpc-go/tree/master{/dir} https://github.com/yarpc/yarpc-go/tree/master{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/heeheehee"> </head> <body> @@ -99,7 +96,6 @@ func TestDeepImports(t *testing.T) { <html> <head> <meta name="go-import" content="go.uber.org/yarpc git https://github.com/yarpc/yarpc-go"> - <meta name="go-source" content="go.uber.org/yarpc https://github.com/yarpc/yarpc-go https://github.com/yarpc/yarpc-go/tree/master{/dir} https://github.com/yarpc/yarpc-go/tree/master{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uber.org/yarpc/heehee/hawhaw"> </head> <body> @@ -116,7 +112,6 @@ func TestPackageLevelURL(t *testing.T) { <html> <head> <meta name="go-import" content="go.uberalt.org/zap git https://github.com/uber-go/zap"> - <meta name="go-source" content="go.uberalt.org/zap https://github.com/uber-go/zap https://github.com/uber-go/zap/tree/master{/dir} https://github.com/uber-go/zap/tree/master{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url=https://pkg.go.dev/go.uberalt.org/zap"> </head> <body> 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 @@ <html> <head> <meta name="go-import" content="{{ .CanonicalURL }} git https://{{ .Repo }}"> - <meta name="go-source" content="{{ .CanonicalURL }} https://{{ .Repo }} https://{{ .Repo }}/tree/{{ .Branch }}{/dir} https://{{ .Repo }}/tree/{{ .Branch }}{/dir}/{file}#L{line}"> <meta http-equiv="refresh" content="0; url={{ .GodocURL }}"> </head> <body> |