diff --git a/cmd/godoc/index.go b/cmd/godoc/index.go index c3cfe69adf..b233275d97 100644 --- a/cmd/godoc/index.go +++ b/cmd/godoc/index.go @@ -762,7 +762,7 @@ func canonical(w string) string { return strings.ToLower(w) } // func NewIndex(dirnames <-chan string, fulltextIndex bool, throttle float64) *Index { var x Indexer - th := NewThrottle(throttle, 100*time.Millisecond) // run at least 0.1s at a time + th := util.NewThrottle(throttle, 100*time.Millisecond) // run at least 0.1s at a time // initialize Indexer // (use some reasonably sized maps to start) diff --git a/cmd/godoc/throttle.go b/godoc/util/throttle.go similarity index 99% rename from cmd/godoc/throttle.go rename to godoc/util/throttle.go index ac18b44e0e..53d9ba621e 100644 --- a/cmd/godoc/throttle.go +++ b/godoc/util/throttle.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package util import "time"