INNER CODE UNIT · Go
run
werf/nelm · scripts/denolock/main.go:60
func run(ctx context.Context) error {
opts := parseFlags()
if opts.verify {
return verifyLock(ctx, opts)
}
client := util.NewRestyClient(ctx)
client.SetTimeout(requestTimeout)
if opts.checkUpstream {
return checkUpstream(ctx, client, 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)
}