加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
FOOT000Cmd.go 776 Bytes
一键复制 编辑 原始数据 按行查看 历史
shi.zeyuan 提交于 2020-07-14 10:17 . 1.bug fix
package main
import (
"bufio"
"fmt"
"os"
"strings"
launch2 "tesou.io/platform/foot-parent/foot-core/launch"
"tesou.io/platform/foot-parent/foot-spider/launch"
)
func main() {
HEAD:
inputReader := bufio.NewReader(os.Stdin)
fmt.Printf("Please enter:")
input, err := inputReader.ReadString('\n')
if err != nil {
fmt.Println("There were errors reading, exiting program.")
return
}
input = strings.ToLower(input)
switch input {
case "exit\n", "exit\r\n", "quit\n", "quit\r\n":
break;
case "\n", "\r\n":
goto HEAD
case "init\n", "init\r\n":
launch2.GenTable()
launch2.TruncateTable()
goto HEAD
case "spider\n", "spider\r\n":
launch.Spider()
goto HEAD
case "analy\n", "analy\r\n":
launch2.Analy(false)
goto HEAD
default:
goto HEAD
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化