remove unused parameter in Download
This commit is contained in:
parent
6cf2c14c00
commit
12180948be
4 changed files with 5 additions and 5 deletions
2
api.go
2
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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue