/godownload

Download files as in wget :file_folder:

Primary LanguageGoMIT LicenseMIT

godownload

Codacy Badge Build Status Go Report Card

Downloading files

Install

go get https://github.com/saromanov/godownload

Usage

Download file

package main
import "github.com/saromanov/godownload"

func main() { 
    godownload.Download("http://arxiv.org/pdf/1206.5538v3.pdf", nil)
}

Download with set output file

godownload.Download("http://arxiv.org/pdf/1206.5538v3.pdf", &godownload.Options{Outpath: "fun.pdf"})

If you have a links on the file, you can download data by this links

download.FromFile("file")

API

godownload.Options

Url - Url parameter needs only for DownloadMany. In the case with Download. This paremeter will be ignore

Outpath - Outpath sets the path of the downloaded file