gen-manifests: simplify flag definitions

Remove the reliance on flag variable pointers and read the argument
values directly into the target variables.
This commit is contained in:
Achilleas Koutsou 2022-07-18 13:28:25 +02:00 committed by Christian Kellner
parent d61b553045
commit a018c69f90

View file

@ -323,15 +323,13 @@ func mergeOverrides(base, overrides composeRequest) composeRequest {
}
func main() {
outputDirFlag := flag.String("output", "test/data/manifests.plain/", "manifest store directory")
nWorkersFlag := flag.Int("workers", 16, "number of workers to run concurrently")
cacheRootFlag := flag.String("cache", "/tmp/rpmmd", "rpm metadata cache directory")
var outputDir, cacheRoot string
var nWorkers int
flag.StringVar(&outputDir, "output", "test/data/manifests.plain/", "manifest store directory")
flag.IntVar(&nWorkers, "workers", 16, "number of workers to run concurrently")
flag.StringVar(&cacheRoot, "cache", "/tmp/rpmmd", "rpm metadata cache directory")
flag.Parse()
outputDir := *outputDirFlag
nWorkers := *nWorkersFlag
cacheRoot := *cacheRootFlag
seedArg := int64(0)
darm := readRepos()
distros := distroregistry.NewDefault()