Small Additions & Fixes

- Other flag variants are added
- New line problem at printing the error message is fixed
This commit is contained in:
*Nix Fanboy
2024-10-25 16:12:00 +03:00
parent 56bd5a2d47
commit 25e42270a6

View File

@@ -161,13 +161,13 @@ func main() {
flag := argv[0]
switch flag {
case "-h":
case "-h", "/H", "--help", "help":
fmt.Println(helpMenu)
return
case "-i":
case "-i", "/I", "--input", "ipt":
if argc < 2 {
_, _ = fmt.Fprintf(os.Stderr, "Enter a file. Type 'objdetect -h' to get help")
_, _ = fmt.Fprintln(os.Stderr, "Enter a file. Type 'objdetect -h' to get help")
os.Exit(1)
}
@@ -175,7 +175,7 @@ func main() {
return
default:
_, _ = fmt.Fprintf(os.Stderr, "Invalid flag. Type 'objdetect -h' to get help")
_, _ = fmt.Fprintln(os.Stderr, "Invalid flag. Type 'objdetect -h' to get help")
os.Exit(1)
}
}