From b0265e0a38a71fdbebf3b6ef53120249d399e293 Mon Sep 17 00:00:00 2001 From: Charles Hooper Date: Tue, 12 Mar 2013 23:06:07 +0000 Subject: [PATCH] Remove Curl function from future --- future/future.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/future/future.go b/future/future.go index 477fe7c32..0063794e0 100644 --- a/future/future.go +++ b/future/future.go @@ -8,7 +8,6 @@ import ( "io" "math/rand" "net/http" - "os/exec" "time" ) @@ -87,25 +86,6 @@ func Pv(src io.Reader, info io.Writer) io.Reader { return r } -// Curl makes an http request by executing the unix command 'curl', and returns -// the body of the response. If `stderr` is not nil, a progress bar will be -// written to it. -func Curl(url string, stderr io.Writer) (io.Reader, error) { - curl := exec.Command("curl", "-#", "-L", "--fail", url) - output, err := curl.StdoutPipe() - if err != nil { - return nil, err - } - curl.Stderr = stderr - if err := curl.Start(); err != nil { - return nil, err - } - if err := curl.Wait(); err != nil { - return nil, err - } - return output, nil -} - // Request a given URL and return an io.Reader func Download(url string, stderr io.Writer) (*http.Response, error) { var resp *http.Response