Handle flags after arguments

This commit is contained in:
Evan Su 2024-04-25 22:13:41 -04:00 committed by GitHub
parent 97bde62236
commit 1b4998d4e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,6 +107,12 @@ func work() int {
}
}
}
for _, v := range flag.Args() {
if v == "-p" || v == "-r" || v == "-fix" {
fmt.Println("Flags are only accepted before arguments!")
return 1
}
}
var password, cpassword []byte
var err error