aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--go.mod2
-rw-r--r--main.go4
2 files changed, 4 insertions, 2 deletions
diff --git a/go.mod b/go.mod
index cfbba60..54c5f95 100644
--- a/go.mod
+++ b/go.mod
@@ -1,3 +1,5 @@
module github.com/nekr0z/radiorus-rss
require github.com/gorilla/feeds v1.1.1
+
+go 1.13
diff --git a/main.go b/main.go
index c0cc9a0..23f6eac 100644
--- a/main.go
+++ b/main.go
@@ -51,7 +51,6 @@ var (
Created: time.Now(),
}
outputPath, programNumber string
- err error
)
func main() {
@@ -94,10 +93,11 @@ func main() {
dateBytes := episodeDateRe.FindSubmatch(episode)
var date [5]int
for i, b := range dateBytes[1:] {
- date[i], err = strconv.Atoi(string(b))
+ d, err := strconv.Atoi(string(b))
if err != nil {
log.Fatal(err)
}
+ date[i] = d
}
moscow := time.FixedZone("Moscow Time", int((3 * time.Hour).Seconds()))
episodeDate := time.Date(date[2], time.Month(date[1]), date[0], date[3], date[4], 0, 0, moscow)