mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-07 04:09:15 +02:00
fix:#41 fixed linter
This commit is contained in:
@@ -17,7 +17,6 @@
|
|||||||
package fetch
|
package fetch
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
@@ -46,7 +45,7 @@ func GetHTMLWithClient(url string, client *http.Client) (string, error) {
|
|||||||
|
|
||||||
if response.StatusCode != 200 {
|
if response.StatusCode != 200 {
|
||||||
slog.Warn("While fetching the HTML document, the server responded with status code: ", "status", response.StatusCode)
|
slog.Warn("While fetching the HTML document, the server responded with status code: ", "status", response.StatusCode)
|
||||||
return "", errors.New(fmt.Sprintf("Server responded with status code: %d", response.StatusCode))
|
return "", fmt.Errorf("Server responded with status code: %d", response.StatusCode)
|
||||||
}
|
}
|
||||||
|
|
||||||
defer func(Body io.ReadCloser) {
|
defer func(Body io.ReadCloser) {
|
||||||
|
Reference in New Issue
Block a user