title: How can I start the browser AFTER the server started listening?
body: <p>In Go, how can I start the browser AFTER the server started listening?</p>
  <p>Preferably the simplest way possible.</p>
  <p>My code so far, super dumbed down to the point:</p>
  <pre><code>package main
  
  import (  
      // Standard library packages
      &quot;fmt&quot;
      &quot;net/http&quot;
      &quot;github.com/skratchdot/open-golang/open&quot;
      // Third party packages
      &quot;github.com/julienschmidt/httprouter&quot;
  )
  
  
  // go get github.com/toqueteos/webbrowser
  
  func main() {  
      // Instantiate a new router
      r := httprouter.New()
  
      // Add a handler on /test
      r.GET(&quot;/test&quot;, func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) {
          // Simply write some test data for now
          fmt.Fprint(w, &quot;Welcome!\n&quot;)
      })
      
      //open.Run(&quot;https://google.com/&quot;)
       
      // open.Start(&quot;https://google.com&quot;)
  
      // http://127.0.0.1:3000/test
      // Fire up the server
      http.ListenAndServe(&quot;localhost:3000&quot;, r)
      fmt.Println(&quot;ListenAndServe is blocking&quot;)  
      open.RunWith(&quot;http://localhost:3000/test&quot;, &quot;firefox&quot;)  
      fmt.Println(&quot;Done&quot;)
  }
  </code></pre>