Standard library / net/http

http.DefaultMaxIdleConnsPerHost

Default per-host idle connection limit when Transport.MaxIdleConnsPerHost is zero; not an active connection limit. Expected stdout: '2\n'.

Formal Syntax & Structure

go syntaxgo
const DefaultMaxIdleConnsPerHost = 2

Working Example

Example Snippetgo
package main
import (  "fmt"  "net/http")
func main() { fmt.Println(http.DefaultMaxIdleConnsPerHost) }
func must[T any](v T, e error) T {  if e != nil {    panic(e)  }  return v}func check(e error) {  if e != nil {    panic(e)  }}
Go Reference