From 12180948be8040a4cdf99a0e660098cd33e32832 Mon Sep 17 00:00:00 2001 From: Victor Vieux Date: Wed, 4 Dec 2013 11:54:11 -0800 Subject: [PATCH] remove unused parameter in Download --- api.go | 2 +- buildfile.go | 2 +- server.go | 4 ++-- utils/utils.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api.go b/api.go index 62486ca9d..ab9990aa4 100644 --- a/api.go +++ b/api.go @@ -932,7 +932,7 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ } context = c } else if utils.IsURL(remoteURL) { - f, err := utils.Download(remoteURL, ioutil.Discard) + f, err := utils.Download(remoteURL) if err != nil { return err } diff --git a/buildfile.go b/buildfile.go index e8f178fbb..170d739ee 100644 --- a/buildfile.go +++ b/buildfile.go @@ -258,7 +258,7 @@ func (b *buildFile) CmdVolume(args string) error { } func (b *buildFile) addRemote(container *Container, orig, dest string) error { - file, err := utils.Download(orig, ioutil.Discard) + file, err := utils.Download(orig) if err != nil { return err } diff --git a/server.go b/server.go index 40ee7e3c4..1f0fe371b 100644 --- a/server.go +++ b/server.go @@ -443,7 +443,7 @@ func (srv *Server) ImageInsert(name, url, path string, out io.Writer, sf *utils. return err } - file, err := utils.Download(url, out) + file, err := utils.Download(url) if err != nil { return err } @@ -1248,7 +1248,7 @@ func (srv *Server) ImageImport(src, repo, tag string, in io.Reader, out io.Write out.Write(sf.FormatStatus("", "Downloading from %s", u)) // Download with curl (pretty progress bar) // If curl is not available, fallback to http.Get() - resp, err = utils.Download(u.String(), out) + resp, err = utils.Download(u.String()) if err != nil { return err } diff --git a/utils/utils.go b/utils/utils.go index 0e0c23176..6864dddf8 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -45,7 +45,7 @@ func Go(f func() error) chan error { } // Request a given URL and return an io.Reader -func Download(url string, stderr io.Writer) (*http.Response, error) { +func Download(url string) (*http.Response, error) { var resp *http.Response var err error if resp, err = http.Get(url); err != nil {