调试:
go run .
构建:
// normal: go build -ldflags "-s -w" -o ./bin/ .
// linux:
GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o ./bin/ .
./bin/rss-reader
配置文件位于config.json,sources是RSS订阅链接,示例如下
{
"values": [
"https://www.zhihu.com/rss",
"https://tech.meituan.com/feed/",
"http://www.ruanyifeng.com/blog/atom.xml",
"https://feeds.appinn.com/appinns/",
"https://v2ex.com/feed/tab/tech.xml",
"https://www.cmooc.com/feed",
"http://www.sciencenet.cn/xml/blog.aspx?di=30",
"https://www.douban.com/feed/review/book",
"https://www.douban.com/feed/review/movie",
"https://www.geekpark.net/rss",
"https://hostloc.com/forum.php?mod=rss&fid=45&auth=389ec3vtQanmEuRoghE%2FpZPWnYCPmvwWgSa7RsfjbQ%2BJpA%2F6y6eHAx%2FKqtmPOg"
],
"refresh": 6,
"autoUpdatePush": 7
}
名称 | 说明 |
---|---|
values | rss订阅链接(必填) |
refresh | rss订阅更新时间间隔,单位分钟(必填) |
autoUpdatePush | 自动刷新间隔,默认为0,不开启。效果为前端每autoUpdatePush分钟自动更新页面信息,单位分钟(非必填) |