zrcadlo
https://github.com/quitesimpleorg/hs9001.git
synchronizováno 2024-11-22 02:57:51 +01:00
Don't crash when no arguments are given
Tento commit je obsažen v:
rodič
c271bc986d
revize
a2bcc9685a
6
main.go
6
main.go
@ -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" {
|
||||
|
Načítá se…
Odkázat v novém úkolu
Zablokovat Uživatele