remove unused parameter in Download

This commit is contained in:
Victor Vieux 2013-12-04 11:54:11 -08:00
parent 6cf2c14c00
commit 12180948be
4 changed files with 5 additions and 5 deletions

2
api.go
View File

@ -932,7 +932,7 @@ func postBuild(srv *Server, version float64, w http.ResponseWriter, r *http.Requ
} }
context = c context = c
} else if utils.IsURL(remoteURL) { } else if utils.IsURL(remoteURL) {
f, err := utils.Download(remoteURL, ioutil.Discard) f, err := utils.Download(remoteURL)
if err != nil { if err != nil {
return err return err
} }

View File

@ -258,7 +258,7 @@ func (b *buildFile) CmdVolume(args string) error {
} }
func (b *buildFile) addRemote(container *Container, orig, dest 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 { if err != nil {
return err return err
} }

View File

@ -443,7 +443,7 @@ func (srv *Server) ImageInsert(name, url, path string, out io.Writer, sf *utils.
return err return err
} }
file, err := utils.Download(url, out) file, err := utils.Download(url)
if err != nil { if err != nil {
return err 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)) out.Write(sf.FormatStatus("", "Downloading from %s", u))
// Download with curl (pretty progress bar) // Download with curl (pretty progress bar)
// If curl is not available, fallback to http.Get() // 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 { if err != nil {
return err return err
} }

View File

@ -45,7 +45,7 @@ func Go(f func() error) chan error {
} }
// Request a given URL and return an io.Reader // 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 resp *http.Response
var err error var err error
if resp, err = http.Get(url); err != nil { if resp, err = http.Get(url); err != nil {