修改时间显示不更新

This commit is contained in:
Lyric-c 2023-08-18 10:22:04 +08:00
parent e3250bf686
commit c8583357cf

View File

@ -110,11 +110,11 @@ func wsHandler(w http.ResponseWriter, r *http.Request) {
func updateFeeds() {
var (
tick = time.Tick(time.Duration(rssUrls.ReFresh) * time.Minute)
fp = gofeed.NewParser()
formattedTime = time.Now().Format("2006-01-02 15:04:05")
tick = time.Tick(time.Duration(rssUrls.ReFresh) * time.Minute)
fp = gofeed.NewParser()
)
for {
formattedTime := time.Now().Format("2006-01-02 15:04:05")
for _, url := range rssUrls.Values {
go updateFeed(fp, url, formattedTime)
}