(args []string, opts rootRunOptions)
| 427 | } |
| 428 | |
| 429 | func queueInitialRootDownloads(args []string, opts rootRunOptions) { |
| 430 | atomic.AddInt32(&pendingEnqueue, 1) |
| 431 | go func() { |
| 432 | defer atomic.AddInt32(&pendingEnqueue, -1) |
| 433 | var urls []string |
| 434 | urls = append(urls, args...) |
| 435 | |
| 436 | if opts.batchFile != "" { |
| 437 | fileURLs, err := utils.ReadURLsFromFile(opts.batchFile) |
| 438 | if err != nil { |
| 439 | fmt.Fprintf(os.Stderr, "Error reading batch file: %v\n", err) |
| 440 | } else { |
| 441 | urls = append(urls, fileURLs...) |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | if len(urls) > 0 { |
| 446 | resolvedOutputDir := resolveClientOutputPath(opts.outputDir) |
| 447 | processDownloads(urls, resolvedOutputDir, 0) // 0 port = internal direct add |
| 448 | } |
| 449 | }() |
| 450 | } |
| 451 | |
| 452 | // rootCmd represents the base command when called without any subcommands |
| 453 | var rootCmd = &cobra.Command{ |
no test coverage detected