1
0
spogulis no https://github.com/quitesimpleorg/hs9001.git synced 2024-11-25 03:32:36 +01:00

Don't crash when no arguments are given

Šī revīzija ir iekļauta:
lawl 2021-03-20 20:22:38 +01:00
vecāks c271bc986d
revīzija a2bcc9685a

Parādīt failu

@ -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" {