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:
parent
d61b553045
commit
a018c69f90
1 changed files with 5 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue