aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Kuznetsov <evgeny@kuznetsov.md>2022-03-21 18:55:37 +0300
committerEvgeny Kuznetsov <evgeny@kuznetsov.md>2022-03-21 18:55:37 +0300
commit23c84cbbaac1190c5d156bc93de2d48dc9a658f5 (patch)
tree16e38ebaae46c85000ee1289e9fef4c8b91dcc72
parent400094b2d321e22a261e64246ec1134f961cc0e8 (diff)
downloadradiorus-rss-23c84cbbaac1190c5d156bc93de2d48dc9a658f5.tar.gz
radiorus-rss-23c84cbbaac1190c5d156bc93de2d48dc9a658f5.zip
satisfy linter
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/main.go b/main.go
index 124a142..e49bc83 100644
--- a/main.go
+++ b/main.go
@@ -289,6 +289,9 @@ func addText(arr []string, str string) []string {
func getPage(pageUrl string) []byte {
client := &http.Client{}
req, err := http.NewRequest("GET", pageUrl, nil)
+ if err != nil {
+ log.Fatal(err)
+ }
req.Header.Add("User-Agent", `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.27 Safari/537.36`)
res, err := client.Do(req)
if err != nil {