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:
Jordan Liggitt 2017-01-30 14:42:42 -05:00
parent 2cb17cc677
commit cef71341c5
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012
2 changed files with 2 additions and 18 deletions

View File

@ -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.

View File

@ -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.