Merge pull request #81708 from RainbowMango/pr_fix_static_failure_for_code-generator

Fix static failure for package: staging/src/k8s.io/code-generator
This commit is contained in:
Kubernetes Prow Robot 2019-10-23 23:25:07 -07:00 committed by GitHub
commit 98442617cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 14 deletions

View File

@ -170,9 +170,6 @@ vendor/k8s.io/client-go/rest/watch
vendor/k8s.io/client-go/restmapper
vendor/k8s.io/client-go/tools/leaderelection
vendor/k8s.io/client-go/transport
vendor/k8s.io/code-generator/cmd/client-gen/generators/fake
vendor/k8s.io/code-generator/cmd/client-gen/generators/util
vendor/k8s.io/code-generator/cmd/go-to-protobuf/protobuf
vendor/k8s.io/component-base/metrics
vendor/k8s.io/kubectl/pkg/cmd/annotate
vendor/k8s.io/kubectl/pkg/cmd/certificates

View File

@ -165,10 +165,3 @@ func (c *Clientset) $.GroupGoName$$.Version$() $.PackageAlias$.$.GroupGoName$$.V
return &fake$.PackageAlias$.Fake$.GroupGoName$$.Version${Fake: &c.Fake}
}
`
var clientsetInterfaceDefaultVersionImpl = `
// $.GroupGoName$ retrieves the $.GroupGoName$$.Version$Client
func (c *Clientset) $.GroupGoName$() $.PackageAlias$.$.GroupGoName$$.Version$Interface {
return &fake$.PackageAlias$.Fake$.GroupGoName$$.Version${Fake: &c.Fake}
}
`

View File

@ -190,7 +190,7 @@ func MustParseClientGenTags(lines []string) Tags {
func ParseClientGenTags(lines []string) (Tags, error) {
ret := Tags{}
values := types.ExtractCommentTags("+", lines)
value := []string{}
var value []string
value, ret.GenerateClient = values["genclient"]
// Check the old format and error when used to avoid generating client when //+genclient=false
if len(value) > 0 && len(value[0]) > 0 {

View File

@ -279,7 +279,7 @@ func Run(g *Generator) {
cmd := exec.Command("protoc", append(args, path)...)
out, err := cmd.CombinedOutput()
if len(out) > 0 {
log.Printf(string(out))
log.Print(string(out))
}
if err != nil {
log.Println(strings.Join(cmd.Args, " "))
@ -300,7 +300,7 @@ func Run(g *Generator) {
cmd = exec.Command("goimports", "-w", outputPath)
out, err = cmd.CombinedOutput()
if len(out) > 0 {
log.Printf(string(out))
log.Print(string(out))
}
if err != nil {
log.Println(strings.Join(cmd.Args, " "))
@ -311,7 +311,7 @@ func Run(g *Generator) {
cmd = exec.Command("gofmt", "-s", "-w", outputPath)
out, err = cmd.CombinedOutput()
if len(out) > 0 {
log.Printf(string(out))
log.Print(string(out))
}
if err != nil {
log.Println(strings.Join(cmd.Args, " "))