parseAllowRequest will parse cmdArgs and return a copy of the args and result of the allow request was present
(cmdArgs []string)
| 482 | // parseAllowRequest will parse cmdArgs and return a copy of the args and result |
| 483 | // of the allow request was present |
| 484 | func parseAllowRequest(cmdArgs []string) ([]string, bool) { |
| 485 | if len(cmdArgs) > 1 { |
| 486 | if cmdArgs[0] == "--allow-request" || cmdArgs[0] == "-ar" { |
| 487 | return cmdArgs[1:], true |
| 488 | } |
| 489 | } |
| 490 | |
| 491 | return cmdArgs, false |
| 492 | } |
| 493 | |
| 494 | // processURL will preprocess the string (parse to a url, convert to punycode, etc). |
| 495 | func processURL(s string) (*url.URL, error) { |