Use curl-like naming for errors

This commit is contained in:
webb 2020-09-03 18:32:41 -04:00
parent 996e1ebb01
commit 0521af1ae4
No known key found for this signature in database
GPG Key ID: 8B6F0D2784D22DB2
1 changed files with 3 additions and 3 deletions

View File

@ -14,16 +14,16 @@ func main() {
switch os.Args[1] {
case "upload":
if len(os.Args[2:]) > 1 {
fmt.Println("ERROR: too many arguments!")
fmt.Println("interrupt: too many arguments!")
os.Exit(1)
} else if len(os.Args[2:]) == 0 {
fmt.Println("ERROR: Please supply a file to upload.")
fmt.Println("interrupt: Please supply a file to upload.")
os.Exit(1)
}
uploadHandler(os.Args[2])
}
fmt.Println("ERROR: Missing subcommand.")
fmt.Println("interrupt: Missing subcommand.")
os.Exit(1)
}