diff --git a/goutil.go b/goutil.go index 30bce51..afdab06 100644 --- a/goutil.go +++ b/goutil.go @@ -326,13 +326,13 @@ func DownloadAll(url string) ([]byte, error) { return data, err } -func DownloadToFile(f string, url string) error { +func DownloadToFile(url string, dest string) error { resp, err := http.Get(url) if err != nil { return errors.New("DownloadToFile: " + err.Error()) } defer resp.Body.Close() - file, err := os.Create(f) + file, err := os.Create(dest) if err != nil { return errors.New("DownloadToFile: " + err.Error()) }