go.mod: bump client-go and api machinerie
I had to run `make generate`. Some API functions got additional parameters `Options` and `Context`. I used empty options and `context.TODO()` for now. Signed-off-by: leonnicolas <leonloechner@gmx.de>
This commit is contained in:
15
vendor/k8s.io/gengo/args/args.go
generated
vendored
15
vendor/k8s.io/gengo/args/args.go
generated
vendored
@@ -74,6 +74,9 @@ type GeneratorArgs struct {
|
||||
// If true, only verify, don't write anything.
|
||||
VerifyOnly bool
|
||||
|
||||
// If true, include *_test.go files
|
||||
IncludeTestFiles bool
|
||||
|
||||
// GeneratedBuildTag is the tag used to identify code generated by execution
|
||||
// of this type. Each generator should use a different tag, and different
|
||||
// groups of generators (external API that depends on Kube generations) should
|
||||
@@ -109,7 +112,7 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
b = bytes.Replace(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().Year())), -1)
|
||||
b = bytes.Replace(b, []byte("YEAR"), []byte(strconv.Itoa(time.Now().UTC().Year())), -1)
|
||||
|
||||
if g.GeneratedByCommentTemplate != "" {
|
||||
if len(b) != 0 {
|
||||
@@ -127,6 +130,10 @@ func (g *GeneratorArgs) LoadGoBoilerplate() ([]byte, error) {
|
||||
// directories.
|
||||
func (g *GeneratorArgs) NewBuilder() (*parser.Builder, error) {
|
||||
b := parser.New()
|
||||
|
||||
// flag for including *_test.go
|
||||
b.IncludeTestFiles = g.IncludeTestFiles
|
||||
|
||||
// Ignore all auto-generated files.
|
||||
b.AddBuildTags(g.GeneratedBuildTag)
|
||||
|
||||
@@ -152,6 +159,9 @@ func (g *GeneratorArgs) InputIncludes(p *types.Package) bool {
|
||||
if strings.HasSuffix(d, "...") {
|
||||
d = strings.TrimSuffix(d, "...")
|
||||
}
|
||||
if strings.HasPrefix(d, "./vendor/") {
|
||||
d = strings.TrimPrefix(d, "./vendor/")
|
||||
}
|
||||
if strings.HasPrefix(p.Path, d) {
|
||||
return true
|
||||
}
|
||||
@@ -184,6 +194,9 @@ func (g *GeneratorArgs) Execute(nameSystems namer.NameSystems, defaultSystem str
|
||||
return fmt.Errorf("Failed making a parser: %v", err)
|
||||
}
|
||||
|
||||
// pass through the flag on whether to include *_test.go files
|
||||
b.IncludeTestFiles = g.IncludeTestFiles
|
||||
|
||||
c, err := generator.NewContext(b, nameSystems, defaultSystem)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed making a context: %v", err)
|
||||
|
Reference in New Issue
Block a user