mirror of https://gitea.com/webb/interrupt
Use curl-like naming for errors
This commit is contained in:
parent
996e1ebb01
commit
0521af1ae4
6
main.go
6
main.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue