mirror of
https://github.com/golang/go
synced 2024-11-18 12:54:44 -07:00
8239116d59
On tip, search included redundant source results from /pkg/bootstrap (with broken links as godoc doesn't support source files under /pkg). This change excludes all directories under /pkg from indexing. Fixes golang/go#10024. Change-Id: I0c69d22ff08d131f9c37c91a7711db6a4ec53fd4 Reviewed-on: https://go-review.googlesource.com/7267 Reviewed-by: Andrew Gerrand <adg@golang.org>
12 lines
298 B
Go
12 lines
298 B
Go
// Copyright 2015 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
import "strings"
|
|
|
|
func indexDirectoryDefault(dir string) bool {
|
|
return dir != "/pkg" && !strings.HasPrefix(dir, "/pkg/")
|
|
}
|