chore(grequests): update grequests to v2
This commit is contained in:
parent
a88da88a47
commit
00bf1820f1
5 changed files with 18 additions and 13 deletions
3
main.go
3
main.go
|
@ -1,6 +1,7 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"os"
|
||||
|
@ -37,7 +38,7 @@ func main() {
|
|||
|
||||
ctx := downloader.NewContext(config.DataFile, config.DataURL)
|
||||
if !ctx.FileExists() {
|
||||
if downloadErr := ctx.Download(); downloadErr != nil {
|
||||
if downloadErr := ctx.Download(context.Background()); downloadErr != nil {
|
||||
panic(err)
|
||||
}
|
||||
slog.Info("saved file", "path", ctx.Filename)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue