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:
eleksir
2026-02-10 20:05:13 +03:00
parent ff57b0af7d
commit f2fc168abe
28 changed files with 1298 additions and 268 deletions

View File

@@ -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")