title: How to get number of idle and "active" connections in Go?
body: <p>Assuming I have a regular HTTP Server in Go. How can I get the currently idle and active TCP connections?</p>
  
  <pre><code>httpServer := &amp;http.Server{
      Handler: newHandler123(),
  }
  
  l, err := net.Listen("tcp", ":8080")
  if err != nil {
      log.Fatal(err)
  }
  
  err = httpServer.Serve(l)
  if err != nil {
      log.Fatal(err)
  }
  </code></pre>