mirror of
https://github.com/teivah/100-go-mistakes.git
synced 2026-06-20 16:45:56 +08:00
21 lines
325 B
Go
21 lines
325 B
Go
package main
|
|
|
|
import (
|
|
"net"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
client := &http.Client{
|
|
Timeout: 5 * time.Second,
|
|
Transport: &http.Transport{
|
|
DialContext: (&net.Dialer{
|
|
Timeout: time.Second,
|
|
}).DialContext,
|
|
TLSHandshakeTimeout: time.Second,
|
|
ResponseHeaderTimeout: time.Second,
|
|
},
|
|
}
|
|
_ = client
|
|
}
|