1
0
镜像自地址 https://github.com/quitesimpleorg/hs9001.git 已同步 2024-11-25 02:22:37 +01:00

Don't crash when no arguments are given

这个提交包含在:
lawl 2021-03-20 20:22:38 +01:00
父节点 c271bc986d
当前提交 a2bcc9685a

查看文件

@ -112,6 +112,12 @@ func main() {
flag.Parse()
args := flag.Args()
argslen := len(args)
if argslen < 1 {
fmt.Fprintf(os.Stderr, "Usage: ./hs9001 <add/search/init>\n")
return
}
cmd := args[0]
if cmd == "add" {