https://github.com/gonejack/get
Basic download library
https://github.com/gonejack/get
Last synced: about 1 month ago
JSON representation
Basic download library
- Host: GitHub
- URL: https://github.com/gonejack/get
- Owner: gonejack
- License: mit
- Created: 2021-04-21T02:14:37.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-27T09:05:37.000Z (about 3 years ago)
- Last Synced: 2023-07-27T22:09:42.785Z (over 2 years ago)
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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])
}
}
```