mirror of
https://github.com/mpolden/echoip.git
synced 2024-11-10 07:27:22 +01:00
cmd: Reject non-option arguments
This commit is contained in:
parent
cd687f6343
commit
0d3594284e
@ -42,6 +42,10 @@ func main() {
|
||||
var headers multiValueFlag
|
||||
flag.Var(&headers, "H", "Header to trust for remote IP, if present (e.g. X-Real-IP)")
|
||||
flag.Parse()
|
||||
if len(flag.Args()) != 0 {
|
||||
flag.Usage()
|
||||
return
|
||||
}
|
||||
|
||||
log := log.New(os.Stderr, "echoip: ", 0)
|
||||
r, err := geo.Open(*countryFile, *cityFile, *asnFile)
|
||||
|
Loading…
Reference in New Issue
Block a user