codegen: Make import-boss do it's own flags

This commit is contained in:
Tim Hockin 2024-01-09 09:31:13 -08:00
parent 1fed36b984
commit 5b2d4384c7
No known key found for this signature in database

View File

@ -18,6 +18,7 @@ limitations under the License.
package main
import (
"flag"
"os"
"github.com/spf13/pflag"
@ -29,10 +30,15 @@ import (
func main() {
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.")
// Collect and parse flags.
arguments.AddFlags(pflag.CommandLine)
pflag.CommandLine.AddGoFlagSet(flag.CommandLine)
pflag.Parse()
if err := arguments.Execute(
generators.NameSystems(),
generators.DefaultNameSystem(),