// DownloadFile will download a url to a local file.
DownloadFile will download a url to a local file.
// DownloadFile will download a url to a local file .
func DownloadFile(filepath string, url string) error {
	resp, err := http.Get(url)
	if err != nil {
		return err
	}
	defer resp.Body.Close()
	out, err := os.Create(filepath)
	if err != nil {
		return err
	}
	defer out.Close()
	_, err = io.Copy(out, resp.Body)
	return err
}
func DownloadFile ( filepath string , url string ) error { resp , err := http . Get ( url ) if err != nil { return err } defer resp . Body . Close ( ) out , err := os . Create ( filepath ) if err != nil { return err } defer out . Close ( ) _ , err = io . Copy ( out , resp . Body ) return err }
DownloadFile will download a url to a local file.
DownloadFile will download a url to a local file .
// Get the data // Create the file // Write the body to file