mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Merge pull request #296 from hashicorp/remove-defaultclient
Remove usage of http.DefaultClient
This commit is contained in:
@@ -86,7 +86,7 @@ type Config struct {
|
||||
func DefaultConfig() *Config {
|
||||
config := &Config{
|
||||
Address: "http://127.0.0.1:4646",
|
||||
HttpClient: http.DefaultClient,
|
||||
HttpClient: &http.Client{},
|
||||
}
|
||||
if addr := os.Getenv("NOMAD_ADDR"); addr != "" {
|
||||
config.Address = addr
|
||||
|
||||
@@ -156,8 +156,7 @@ func NewTestServer(t *testing.T, cb ServerConfigCallback) *TestServer {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
var client *http.Client
|
||||
client = http.DefaultClient
|
||||
client := &http.Client{}
|
||||
|
||||
server := &TestServer{
|
||||
Config: nomadConfig,
|
||||
|
||||
Reference in New Issue
Block a user