Well a timeout of 10 something is a good idea indeed...
This commit is contained in:
parent
082ff6d029
commit
029ece0fd2
1 changed files with 2 additions and 1 deletions
|
@ -8,13 +8,14 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UserAgent (if non-empty) will be tacked onto the User-Agent string in requests.
|
// UserAgent (if non-empty) will be tacked onto the User-Agent string in requests.
|
||||||
var UserAgent string
|
var UserAgent string
|
||||||
|
|
||||||
// HTTPClient is an HTTP client with a reasonable timeout value.
|
// HTTPClient is an HTTP client with a reasonable timeout value.
|
||||||
var HTTPClient = http.Client{Timeout: 10}
|
var HTTPClient = http.Client{Timeout: 10 * time.Second}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// defaultGoUserAgent is the Go HTTP package user agent string. Too
|
// defaultGoUserAgent is the Go HTTP package user agent string. Too
|
||||||
|
|
Loading…
Reference in a new issue