package main import ( "flag" "fmt" "os" "git.32bit.cafe/yequari/rss-gen/rss" ) func main() { siteUrl := flag.String("url", "", "url of site") siteTitle := flag.String("title", "", "site title") siteDesc := flag.String("desc", "", "site description") flag.Parse() if *siteUrl == "" || *siteTitle == "" || *siteDesc == "" { flag.PrintDefaults() } feed, err := rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...) if err != nil { os.Stderr.WriteString(err.Error()) } fmt.Println(feed) }