INNER CODE UNIT · Go
run
werf/nelm · scripts/schemagen/main.go:76
func run(ctx context.Context) error {
opts := parseFlags()
if opts.verify {
return verifyBundles(ctx, opts)
}
if opts.checkUpstream {
return checkUpstream(ctx, &http.Client{Timeout: requestTimeout}, opts)
}
// Zero would deadlock the download semaphore and a negative value would panic building it.
if opts.parallelism < 1 {
return fmt.Errorf("parallelism must be positive, got %d", opts.parallelism)
}
existingIndex := readExistingIndex(filepath.Join(opts.outputDir, indexFileName))
client := &http.Client{Timeout: requestTimeout}