mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-18 08:09:58 +00:00
codegen: Make import-boss do it's own flags
This commit is contained in:
parent
1fed36b984
commit
5b2d4384c7
@ -18,6 +18,7 @@ limitations under the License.
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"flag"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
@ -29,10 +30,15 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
klog.InitFlags(nil)
|
klog.InitFlags(nil)
|
||||||
arguments := args.Default()
|
arguments := args.Default().WithoutDefaultFlagParsing()
|
||||||
|
|
||||||
pflag.CommandLine.BoolVar(&arguments.IncludeTestFiles, "include-test-files", false, "If true, include *_test.go files.")
|
pflag.CommandLine.BoolVar(&arguments.IncludeTestFiles, "include-test-files", false, "If true, include *_test.go files.")
|
||||||
|
|
||||||
|
// Collect and parse flags.
|
||||||
|
arguments.AddFlags(pflag.CommandLine)
|
||||||
|
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
|
||||||
|
pflag.Parse()
|
||||||
|
|
||||||
if err := arguments.Execute(
|
if err := arguments.Execute(
|
||||||
generators.NameSystems(),
|
generators.NameSystems(),
|
||||||
generators.DefaultNameSystem(),
|
generators.DefaultNameSystem(),
|
||||||
|
Loading…
Reference in New Issue
Block a user