From 6273e2cefb9faedac63e02f1c8cdaa6730beeaaf Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 28 May 2022 21:55:03 +0800 Subject: [PATCH] Remove max workers argument Now that we're not spawning subprocesses like crazy it's far less relevant to limit concurrency. --- generate/generate.go | 2 +- main.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/generate/generate.go b/generate/generate.go index 34edb04..c9d88f9 100644 --- a/generate/generate.go +++ b/generate/generate.go @@ -29,7 +29,7 @@ type goModDownload struct { GoModSum string } -func GeneratePkgs(goModPath string, goMod2NixPath string, numWorkers int) ([]*schema.Package, error) { +func GeneratePkgs(goModPath string, goMod2NixPath string) ([]*schema.Package, error) { log.WithFields(log.Fields{ "modPath": goModPath, diff --git a/main.go b/main.go index ed6f783..114c71a 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,6 @@ import ( func main() { var directory = flag.String("dir", "./", "Go project directory") - var maxJobs = flag.Int("jobs", 10, "Number of max parallel jobs") var outDirFlag = flag.String("outdir", "", "output directory (if different from project directory)") flag.Parse() @@ -26,7 +25,7 @@ func main() { goMod2NixPath := filepath.Join(outDir, "gomod2nix.toml") outFile := goMod2NixPath - pkgs, err := generate.GeneratePkgs(goModPath, goMod2NixPath, *maxJobs) + pkgs, err := generate.GeneratePkgs(goModPath, goMod2NixPath) if err != nil { panic(err) }