chore: fix linting issues exposed by fixing golangci-lint (#12895)

Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
Jacob Gadikian
2022-08-11 22:00:24 +02:00
committed by GitHub
co-authored by Marko Julien Robert
parent 15b04c2a87
commit 0943a70215
148 changed files with 570 additions and 468 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import (
// GetRequest defines a wrapper around an HTTP GET request with a provided URL.
// An error is returned if the request or reading the body fails.
func GetRequest(url string) ([]byte, error) {
res, err := http.Get(url) // nolint:gosec
res, err := http.Get(url) //nolint:gosec
if err != nil {
return nil, err
}
@@ -31,7 +31,7 @@ func GetRequest(url string) ([]byte, error) {
// PostRequest defines a wrapper around an HTTP POST request with a provided URL and data.
// An error is returned if the request or reading the body fails.
func PostRequest(url string, contentType string, data []byte) ([]byte, error) {
res, err := http.Post(url, contentType, bytes.NewBuffer(data)) // nolint:gosec
res, err := http.Post(url, contentType, bytes.NewBuffer(data)) //nolint:gosec
if err != nil {
return nil, fmt.Errorf("error while sending post request: %w", err)
}