зеркало из https://github.com/golang/tools.git
godoc: hide vendored packages from /pkg/ as we do with internal packages
Such packages may be viewed by adding ?m=all to the URL. Fixes golang/go#13929 Change-Id: Id0ac48bc2937b5bec722b95b9a690d48d065ea6b Reviewed-on: https://go-review.googlesource.com/18554 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Родитель
b57d82def5
Коммит
b81ea3a5e1
|
@ -215,9 +215,9 @@ func (h *handlerServer) includePath(path string, mode PageInfoMode) (r bool) {
|
|||
if mode&NoFiltering != 0 {
|
||||
return true
|
||||
}
|
||||
if strings.Contains(path, "internal") {
|
||||
if strings.Contains(path, "internal") || strings.Contains(path, "vendor") {
|
||||
for _, c := range strings.Split(filepath.Clean(path), string(os.PathSeparator)) {
|
||||
if c == "internal" {
|
||||
if c == "internal" || c == "vendor" {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче