remove cli executable, add cli code
This commit is contained in:
parent
986dce3230
commit
c82c681221
|
@ -1 +1,22 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
|
||||
"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()
|
||||
}
|
||||
|
||||
fmt.Println(rss.GenerateRss(*siteUrl, *siteTitle, *siteDesc, flag.Args()...))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue