There is no fixed limit on the number of goroutines you can run in Go; the runtime multiplexes millions of lightweight goroutines onto a small number of OS threads, constrained only by available memory. The scheduler automatically adjusts the number of OS threads based on the GOMAXPROCS setting, which defaults to the number of logical CPU cores. You can verify your current parallelism limit with the following command:
runtime.GOMAXPROCS(0)
In a running program, you can also set it explicitly:
runtime.GOMAXPROCS(4)