An open API service indexing awesome lists of open source software.

https://github.com/gonejack/get

Basic download library
https://github.com/gonejack/get

Last synced: about 1 month ago
JSON representation

Basic download library

Awesome Lists containing this project

README

          

# get
Basic download library in golang

### Install
```shell
> go get github.com/gonejack/get
```

### Usage
```golang
func main() {
err := get.Download("https://www.qq.com", "test.html", time.Second*3)
if err != nil {
log.Fatal(err)
}

errors := get.Batch(map[string]string{"https://www.qq.com": "test.html"}, 3, time.Second*3)
for _, e := range errors {
log.Print(e)
}

refs, errs := get.BatchInOrder([]string{"https://www.qq.com"}, []string{"test.html"}, 3, time.Second*3)
for i := range refs {
log.Printf("%s: %s", refs[i], errs[i])
}
}
```