title: Golang equivalent of creating a subprocess in Python
body: <p>I am attempting to convert a Python script to Golang, just really to see performance differences and to help me learn Golang more.</p>
  
  <p>In Python, I have 2 scripts. One is a script that runs an infinite loop and sleeps for a minute before running again. The code checks an endpoint on my server and reads the output, then determines if it needs to do anything. If it does, it handles the output and starts a new subprocess. The subprocess is another Python script that does a lot of calculations and creates hundreds of threads. There can be multiple subprocesses running at any given time and they're all different tasks for different users.</p>
  
  <p>I've got my Golang code reading from the API, and it's ready to start a new subprocess. But I'm not really sure how I go about it. </p>
  
  <p>I know when I've created the new subprocess (or whatever it is that is the Go equivalent) I can create a bunch of Go routines, but really I'm just stuck on the "subprocess" bit.</p>
  
  <p>I have tried using Go routines as a substitute for the subprocess but I don't think this is the way to go? </p>
  
  <p>As requested for visualisation purposes, I have added an example of the code. </p>
  
  <p>api.py:</p>
  
  <pre><code>while True:
      someparameter = 'randomIDfromdatabase'
      subprocess.Popen(["python3", "mycode.py", someparameter])
      time.sleep(60)
  </code></pre>
  
  <p>mycode.py</p>
  
  <pre><code>parameter = sys.argv[1]
  for i in range(0, 100):
      thread.append(MyClass(parameter))
      thread.start()
  </code></pre>
  
  <p>I basically need the Golang equivalent of "subprocess.Popen".</p>