Replace prazdnikisegodnyaru with celebratoday, small underhood fixes
- Replace prazdnikisegodnyaru with celebratoday as first is banned in Russia - Update .golangci.yml rule set - Megatons of fixes for linter - Update README.md
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// Package xkcdru provides api to xkcd.ru.
|
||||
package xkcdru
|
||||
|
||||
import (
|
||||
@@ -25,7 +26,7 @@ func APIClient(cfg *config.MyConfig) (string, error) {
|
||||
}
|
||||
)
|
||||
|
||||
req, err := http.NewRequest(http.MethodGet, url, nil) //nolint: noctx
|
||||
req, err := http.NewRequest(http.MethodGet, url, http.NoBody) //nolint: noctx
|
||||
|
||||
if err != nil {
|
||||
return "", err
|
||||
@@ -48,7 +49,7 @@ func APIClient(cfg *config.MyConfig) (string, error) {
|
||||
}
|
||||
}(resp.Body)
|
||||
|
||||
// Response body нам не интересен, нам интересен статус и нам интересен заголовок Location
|
||||
// Response body нам не интересен, нам интересен статус и нам интересен заголовок Location.
|
||||
if resp.StatusCode == 302 {
|
||||
location := resp.Header.Get("Location")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user