fix cli
This commit is contained in:
parent
6ada6f3ef5
commit
55fd870c81
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"git.32bit.cafe/yequari/rss-gen/rss"
|
||||
"git.32bit.cafe/yequari/rss-gen/feed"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
@ -16,11 +16,13 @@ func main() {
|
|||
flag.Parse()
|
||||
if *siteUrl == "" || *siteTitle == "" || *siteDesc == "" {
|
||||
flag.PrintDefaults()
|
||||
os.Exit(1)
|
||||
}
|
||||
feed, err := rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...)
|
||||
feedInfo, err := feed.NewFeedInfo(*siteTitle, *siteUrl, *siteDesc, "", flag.Args()...)
|
||||
if err != nil {
|
||||
os.Stderr.WriteString(err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Println(feed)
|
||||
fmt.Println(feedInfo.GenerateRSS())
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue