// Download loads the file using http
Download loads the file using http
// Download loads the file using http
func Download(filepath string, url string) error {
	defer helpers.Duration(time.Now(), "Download")
	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)
	fmt.Println("Done downloading file: " + AlkoFileURI)
	return err
}
func Download ( filepath string , url string ) error { defer helpers . Duration ( time . Now ( ) , " " ) 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 ) fmt . Println ( " " + AlkoFileURI ) return err }
Download loads the file using http
Download loads the file using http