kopia lustrzana https://github.com/cblgh/lieu
rodzic
5231ff3571
commit
56d3660b68
6
cli.go
6
cli.go
|
@ -45,7 +45,7 @@ func main() {
|
|||
if len(os.Args) > 1 {
|
||||
cmd = os.Args[1]
|
||||
} else {
|
||||
cmd = "search"
|
||||
cmd = "help"
|
||||
}
|
||||
|
||||
switch cmd {
|
||||
|
@ -60,12 +60,12 @@ func main() {
|
|||
case "crawl":
|
||||
exists := util.CheckFileExists(config.Crawler.Webring)
|
||||
if !exists {
|
||||
fmt.Printf("lieu: webring file %s does not exist\n", config.Data.Webring)
|
||||
fmt.Printf("lieu: webring file %s does not exist\n", config.Crawler.Webring)
|
||||
util.Exit()
|
||||
}
|
||||
sourceLen := len(util.ReadList(config.Crawler.Webring, "\n"))
|
||||
if sourceLen == 0 {
|
||||
fmt.Printf("lieu: nothing to crawl; the webring file %s is empty\n", config.Data.Source)
|
||||
fmt.Printf("lieu: nothing to crawl; the webring file %s is empty\n", config.Crawler.Webring)
|
||||
util.Exit()
|
||||
}
|
||||
crawler.Crawl(config)
|
||||
|
|
Ładowanie…
Reference in New Issue