diff --git a/args.go b/args.go index 2a1dec8..a236cce 100644 --- a/args.go +++ b/args.go @@ -23,7 +23,6 @@ type config struct { delay int headers headerArgs followLocation bool - noPath bool method string saveStatus int timeout int @@ -58,10 +57,6 @@ func processArgs() config { flag.BoolVar(&followLocation, "location", false, "") flag.BoolVar(&followLocation, "L", false, "") - // no path part - noPath := false - flag.BoolVar(&noPath, "nopath", false, "") - // method param method := "GET" flag.StringVar(&method, "method", "GET", "") @@ -118,7 +113,6 @@ func processArgs() config { delay: delay, headers: headers, followLocation: followLocation, - noPath: noPath, method: method, saveStatus: saveStatus, timeout: timeout, @@ -142,7 +136,6 @@ func init() { h += " -d, --delay Milliseconds between requests to the same host (defaut: 5000)\n" h += " -H, --header
Send a custom HTTP header\n" h += " -L, --location Follow redirects / location header\n" - h += " --nopath Treat the hosts file as complete URLs\n" h += " -r, --rawhttp Use the rawhttp library for requests (experimental)\n" h += " -s, --savestatus Save only responses with specific status code\n" h += " -t, --timeout Set the HTTP timeout (default: 10000)\n" diff --git a/main.go b/main.go index 48e0629..2722874 100644 --- a/main.go +++ b/main.go @@ -27,17 +27,11 @@ func main() { // get the config struct c := processArgs() - // read the paths file; unless the nopath option is set - var paths []string - var err error - if c.noPath { - paths = []string{""} - } else { - paths, err = readLinesOrLiteral(c.paths, defaultPathsFile) - if err != nil { - fmt.Fprintf(os.Stderr, "failed to open paths file: %s\n", err) - os.Exit(1) - } + // read the paths file + paths, err := readLinesOrLiteral(c.paths, defaultPathsFile) + if err != nil { + fmt.Fprintf(os.Stderr, "failed to open paths file: %s\n", err) + os.Exit(1) } // read the hosts file