mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
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:
commit
98442617cc
@ -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
|
||||
|
@ -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}
|
||||
}
|
||||
`
|
||||
|
@ -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 {
|
||||
|
@ -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, " "))
|
||||
|
Loading…
Reference in New Issue
Block a user