title: Goroutine creation design pattern
body: <p>When writing logic that should be run as part of a goroutine, should the method itself create the goroutine or the should that be the responsibility of the calling function? For example, which of the below would be preferable?</p>
  <p>Creating the go routine within the method</p>
  <pre><code>func longrunning() chan Result {
      c := make(chan Result)
      go func() {
          // Business Logic Here
          c &lt;- Result{}
      }()
      return c
  }
  
  func main() {
      c := longrunning()
      
      // Do additional tasks
      
      &lt;-c
  }
  </code></pre>
  <p>Leaving it up to the caller</p>
  <pre><code>func longrunning() Result {
      // Business Logic Here
      return Result{}
  }
  
  func main() {
      c := make(chan Result)
  
      go func() {
          c &lt;- longrunning()
      }()
      
      // Do additional tasks
  
      &lt;-c
  }
  </code></pre>