1
0
mirror of https://github.com/golang/go synced 2024-11-18 08:44:43 -07:00

godoc: remove Corpus.testDir field

It was indeed unused.

Updates golang/go#33655

Change-Id: Icb9b9a3d201cc573ae294063b64e38890f37b9ab
Reviewed-on: https://go-review.googlesource.com/c/tools/+/196978
Reviewed-by: Agniva De Sarker <agniva.quicksilver@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Dmitri Shuralyov 2019-08-27 09:43:50 -04:00
parent 035fdb12d3
commit 3ac2a5bbd9

View File

@ -6,7 +6,6 @@ package godoc
import ( import (
"errors" "errors"
pathpkg "path"
"sync" "sync"
"time" "time"
@ -87,8 +86,6 @@ type Corpus struct {
// If nil, all directories are indexed if indexing is enabled. // If nil, all directories are indexed if indexing is enabled.
IndexDirectory func(dir string) bool IndexDirectory func(dir string) bool
testDir string // TODO(bradfitz,adg): migrate old godoc flag? looks unused.
// Send a value on this channel to trigger a metadata refresh. // Send a value on this channel to trigger a metadata refresh.
// It is buffered so that if a signal is not lost if sent // It is buffered so that if a signal is not lost if sent
// during a refresh. // during a refresh.
@ -158,7 +155,7 @@ func (c *Corpus) Init() error {
} }
func (c *Corpus) initFSTree() error { func (c *Corpus) initFSTree() error {
dir := c.newDirectory(pathpkg.Join("/", c.testDir), -1) dir := c.newDirectory("/", -1)
if dir == nil { if dir == nil {
return errors.New("godoc: corpus fstree is nil") return errors.New("godoc: corpus fstree is nil")
} }