Update go dependencies (#4524)
This commit is contained in:
parent
2ba1a9e71a
commit
341d64b652
412 changed files with 43034 additions and 34165 deletions
15
vendor/k8s.io/gengo/parser/parse.go
generated
vendored
15
vendor/k8s.io/gengo/parser/parse.go
generated
vendored
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue