Update go dependencies (#4524)

This commit is contained in:
Manuel Alejandro de Brito Fontes 2019-09-02 21:30:28 -04:00 committed by GitHub
parent 2ba1a9e71a
commit 341d64b652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
412 changed files with 43034 additions and 34165 deletions

15
vendor/k8s.io/gengo/parser/parse.go generated vendored
View file

@ -43,6 +43,9 @@ type importPathString string
type Builder struct {
context *build.Context
// If true, include *_test.go
IncludeTestFiles bool
// Map of package names to more canonical information about the package.
// This might hold the same value for multiple names, e.g. if someone
// referenced ./pkg/name or in the case of vendoring, which canonicalizes
@ -304,11 +307,17 @@ func (b *Builder) addDir(dir string, userRequested bool) error {
b.absPaths[pkgPath] = buildPkg.Dir
}
for _, n := range buildPkg.GoFiles {
if !strings.HasSuffix(n, ".go") {
files := []string{}
files = append(files, buildPkg.GoFiles...)
if b.IncludeTestFiles {
files = append(files, buildPkg.TestGoFiles...)
}
for _, file := range files {
if !strings.HasSuffix(file, ".go") {
continue
}
absPath := filepath.Join(buildPkg.Dir, n)
absPath := filepath.Join(buildPkg.Dir, file)
data, err := ioutil.ReadFile(absPath)
if err != nil {
return fmt.Errorf("while loading %q: %v", absPath, err)