aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--handler.go4
-rw-r--r--handler_test.go5
-rw-r--r--templates/package.html1
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) {
<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>