diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-08-17 22:17:12 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-08-17 22:17:12 +0200 |
commit | 340000e220d05454b2c8e0627f654acb84ede823 (patch) | |
tree | a9b282d12d1d4e591068690cbd98c632158677c5 /client/go | |
parent | f47cc4158759a8bc8a338b4b5bc07c977ce8bcaf (diff) |
Cleanup
Diffstat (limited to 'client/go')
-rw-r--r-- | client/go/src/github.com/vespa-engine/vespa/utils/http.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/client/go/src/github.com/vespa-engine/vespa/utils/http.go b/client/go/src/github.com/vespa-engine/vespa/utils/http.go index 3056811f794..a2ef80637fa 100644 --- a/client/go/src/github.com/vespa-engine/vespa/utils/http.go +++ b/client/go/src/github.com/vespa-engine/vespa/utils/http.go @@ -36,7 +36,7 @@ func CreateClient(timeout time.Duration) HttpClient { } // Convenience function for doing a HTTP GET -func HttpGet(host string, path string, description string) (response *http.Response) { +func HttpGet(host string, path string, description string) *http.Response { url, urlError := url.Parse(host + path) if urlError != nil { Error("Invalid target url '" + host + path + "'") @@ -45,8 +45,7 @@ func HttpGet(host string, path string, description string) (response *http.Respo return HttpDo(&http.Request{URL: url,}, time.Second * 10, description) } -// TODO: Always use this and rename to HttpDo -func HttpDo(request *http.Request, timeout time.Duration, description string) (response *http.Response) { +func HttpDo(request *http.Request, timeout time.Duration, description string) *http.Response { response, error := ActiveHttpClient.Do(request, timeout) if error != nil { Error("Could not connect to", strings.ToLower(description), "at", request.URL.Host) |