mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Remove command line from informer/lister generated comment
Avoids spurious diffs to all generated files when a new group/version is added
This commit is contained in:
parent
2cb17cc677
commit
cef71341c5
@ -28,7 +28,6 @@ import (
|
||||
clientgentypes "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// NameSystems returns the name system used by the generators in this package.
|
||||
@ -63,14 +62,7 @@ func DefaultNameSystem() string {
|
||||
// generatedBy returns information about the arguments used to invoke
|
||||
// lister-gen.
|
||||
func generatedBy() string {
|
||||
var cmdArgs string
|
||||
pflag.VisitAll(func(f *pflag.Flag) {
|
||||
if !f.Changed || f.Name == "verify-only" {
|
||||
return
|
||||
}
|
||||
cmdArgs += fmt.Sprintf("--%s=%s ", f.Name, f.Value)
|
||||
})
|
||||
return fmt.Sprintf("\n// This file was automatically generated by informer-gen with arguments: %s\n\n", cmdArgs)
|
||||
return fmt.Sprintf("\n// This file was automatically generated by informer-gen\n\n")
|
||||
}
|
||||
|
||||
// objectMetaForPackage returns the type of ObjectMeta used by package p.
|
||||
|
@ -29,7 +29,6 @@ import (
|
||||
clientgentypes "k8s.io/kubernetes/cmd/libs/go2idl/client-gen/types"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
// NameSystems returns the name system used by the generators in this package.
|
||||
@ -64,14 +63,7 @@ func DefaultNameSystem() string {
|
||||
// generatedBy returns information about the arguments used to invoke
|
||||
// lister-gen.
|
||||
func generatedBy() string {
|
||||
var cmdArgs string
|
||||
pflag.VisitAll(func(f *pflag.Flag) {
|
||||
if !f.Changed || f.Name == "verify-only" {
|
||||
return
|
||||
}
|
||||
cmdArgs += fmt.Sprintf("--%s=%s ", f.Name, f.Value)
|
||||
})
|
||||
return fmt.Sprintf("\n// This file was automatically generated by lister-gen with arguments: %s\n\n", cmdArgs)
|
||||
return fmt.Sprintf("\n// This file was automatically generated by lister-gen\n\n")
|
||||
}
|
||||
|
||||
// Packages makes the client package definition.
|
||||
|
Loading…
Reference in New Issue
Block a user