Update k8s apis to release-1.14 and update all of vendor
This commit is contained in:
9
vendor/golang.org/x/tools/internal/gopathwalk/walk.go
generated
vendored
9
vendor/golang.org/x/tools/internal/gopathwalk/walk.go
generated
vendored
@@ -35,6 +35,7 @@ const (
|
||||
RootGOPATH
|
||||
RootCurrentModule
|
||||
RootModuleCache
|
||||
RootOther
|
||||
)
|
||||
|
||||
// A Root is a starting point for a Walk.
|
||||
@@ -44,10 +45,10 @@ type Root struct {
|
||||
}
|
||||
|
||||
// SrcDirsRoots returns the roots from build.Default.SrcDirs(). Not modules-compatible.
|
||||
func SrcDirsRoots() []Root {
|
||||
func SrcDirsRoots(ctx *build.Context) []Root {
|
||||
var roots []Root
|
||||
roots = append(roots, Root{filepath.Join(build.Default.GOROOT, "src"), RootGOROOT})
|
||||
for _, p := range filepath.SplitList(build.Default.GOPATH) {
|
||||
roots = append(roots, Root{filepath.Join(ctx.GOROOT, "src"), RootGOROOT})
|
||||
for _, p := range filepath.SplitList(ctx.GOPATH) {
|
||||
roots = append(roots, Root{filepath.Join(p, "src"), RootGOPATH})
|
||||
}
|
||||
return roots
|
||||
@@ -162,7 +163,7 @@ func (w *walker) shouldSkipDir(fi os.FileInfo) bool {
|
||||
func (w *walker) walk(path string, typ os.FileMode) error {
|
||||
dir := filepath.Dir(path)
|
||||
if typ.IsRegular() {
|
||||
if dir == w.root.Path {
|
||||
if dir == w.root.Path && (w.root.Type == RootGOROOT || w.root.Type == RootGOPATH) {
|
||||
// Doesn't make sense to have regular files
|
||||
// directly in your $GOPATH/src or $GOROOT/src.
|
||||
return fastwalk.SkipFiles
|
||||
|
Reference in New Issue
Block a user