Update golangci-lint

This commit is contained in:
9seconds
2020-08-10 14:39:50 +03:00
parent 8ac786581b
commit 7a6695f6c4
47 changed files with 133 additions and 114 deletions
+5 -1
View File
@@ -1,6 +1,7 @@
package api
import (
"context"
"fmt"
"io"
"io/ioutil"
@@ -18,7 +19,10 @@ var httpClient = http.Client{
}
func request(url string) (io.ReadCloser, error) {
req, err := http.NewRequest("GET", url, nil)
ctx, cancel := context.WithTimeout(context.Background(), apiHTTPTimeout)
defer cancel()
req, err := http.NewRequestWithContext(ctx, "GET", url, nil)
if err != nil {
panic(err)
}