diff --git a/blog/blog.go b/blog/blog.go
index c26b6adbcb..73c184d4b4 100644
--- a/blog/blog.go
+++ b/blog/blog.go
@@ -27,11 +27,8 @@ import (
var (
validJSONPFunc = regexp.MustCompile(`(?i)^[a-z_][a-z0-9_.]*$`)
// used to serve relative paths when ServeLocalLinks is enabled.
- // TODO(agnivade): change blog article links to all have https.
golangOrgAbsLinkReplacer = strings.NewReplacer(
- `href="http://golang.org/pkg`, `href="/pkg`,
`href="https://golang.org/pkg`, `href="/pkg`,
- `href="http://golang.org/cmd`, `href="/cmd`,
`href="https://golang.org/cmd`, `href="/cmd`,
)
)
diff --git a/blog/blog_test.go b/blog/blog_test.go
index 90155feadc..c84be2a716 100644
--- a/blog/blog_test.go
+++ b/blog/blog_test.go
@@ -15,10 +15,10 @@ func TestLinkRewrite(t *testing.T) {
output string
}{
{
- `For instance, the bytes package from the standard library exports the Buffer
type.`,
+ `For instance, the bytes package from the standard library exports the Buffer
type.`,
`For instance, the bytes package from the standard library exports the Buffer
type.`},
{
- `(The gofmt command has a -r
flag that provides a syntax-aware search and replace, making large-scale refactoring easier.)`,
+ `(The gofmt command has a -r
flag that provides a syntax-aware search and replace, making large-scale refactoring easier.)`,
`(The gofmt command has a -r
flag that provides a syntax-aware search and replace, making large-scale refactoring easier.)`,
},
{
diff --git a/godoc/index.go b/godoc/index.go
index 8cefd1423d..c9b9bd338e 100644
--- a/godoc/index.go
+++ b/godoc/index.go
@@ -1532,7 +1532,6 @@ func (c *Corpus) RunIndexer() {
}
// Repeatedly update the package directory tree and index.
- // TODO(bgarcia): Use fsnotify to only update when notified of a filesystem change.
for {
c.initFSTree()
c.UpdateIndex()
diff --git a/godoc/server.go b/godoc/server.go
index 9240746d00..3e271bdd6c 100644
--- a/godoc/server.go
+++ b/godoc/server.go
@@ -113,10 +113,7 @@ func (h *handlerServer) GetPageInfo(abspath, relpath string, mode PageInfoMode,
// documentation (historic).
pkgname = "main" // assume package main since pkginfo.Name == ""
pkgfiles = pkginfo.IgnoredGoFiles
- }
-
- // get package information, if any
- if len(pkgfiles) > 0 {
+ } else {
// build package AST
fset := token.NewFileSet()
files, err := h.c.parseFiles(fset, relpath, abspath, pkgfiles)