godoc: remove some unused code
Run goimports while at it.
Change-Id: Ia3fea40835deb88bba0bb72c605bf02a6e407c88
Reviewed-on: https://go-review.googlesource.com/34953
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/godoc/dirtrees.go b/godoc/dirtrees.go
index c631ff7..747c842 100644
--- a/godoc/dirtrees.go
+++ b/godoc/dirtrees.go
@@ -7,7 +7,6 @@
package godoc
import (
- "bytes"
"go/doc"
"go/parser"
"go/token"
@@ -205,20 +204,6 @@
return b.newDirTree(token.NewFileSet(), root, d.Name(), 0)
}
-func (dir *Directory) writeLeafs(buf *bytes.Buffer) {
- if dir != nil {
- if len(dir.Dirs) == 0 {
- buf.WriteString(dir.Path)
- buf.WriteByte('\n')
- return
- }
-
- for _, d := range dir.Dirs {
- d.writeLeafs(buf)
- }
- }
-}
-
func (dir *Directory) walk(c chan<- *Directory, skipRoot bool) {
if dir != nil {
if !skipRoot {
diff --git a/godoc/index.go b/godoc/index.go
index 725121a..8cefd14 100644
--- a/godoc/index.go
+++ b/godoc/index.go
@@ -1429,15 +1429,6 @@
c.refreshMetadata()
}
-// indexUpToDate() returns true if the search index is not older
-// than any of the file systems under godoc's observation.
-//
-func (c *Corpus) indexUpToDate() bool {
- _, fsTime := c.fsModified.Get()
- _, siTime := c.searchIndex.Get()
- return !fsTime.After(siTime)
-}
-
// feedDirnames feeds the directory names of all directories
// under the file system given by root to channel c.
//
diff --git a/godoc/vfs/emptyvfs_test.go b/godoc/vfs/emptyvfs_test.go
index 2d8d72e..09a6cd1 100644
--- a/godoc/vfs/emptyvfs_test.go
+++ b/godoc/vfs/emptyvfs_test.go
@@ -5,10 +5,11 @@
package vfs_test
import (
- "golang.org/x/tools/godoc/vfs"
- "golang.org/x/tools/godoc/vfs/mapfs"
"testing"
"time"
+
+ "golang.org/x/tools/godoc/vfs"
+ "golang.org/x/tools/godoc/vfs/mapfs"
)
func TestNewNameSpace(t *testing.T) {