diff options
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gopherproxy/main.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/gopherproxy/main.go b/cmd/gopherproxy/main.go index aced41b..e9dea18 100644 --- a/cmd/gopherproxy/main.go +++ b/cmd/gopherproxy/main.go | |||
@@ -10,14 +10,15 @@ import ( | |||
10 | var ( | 10 | var ( |
11 | // TODO: Allow config file and environment vars | 11 | // TODO: Allow config file and environment vars |
12 | // (opt -> env -> config -> default) | 12 | // (opt -> env -> config -> default) |
13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") | 13 | bind = flag.String("bind", "0.0.0.0:8000", "[int]:port to bind to") |
14 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") | 14 | robotsfile = flag.String("robots-file", "robots.txt", "robots.txt file") |
15 | uri = flag.String("uri", "floodgap.com", "<host>:[port] to proxy to") | 15 | robotsdebug = flag.Bool("robots-debug", false, "print output about ignored robots.txt") |
16 | uri = flag.String("uri", "floodgap.com", "<host>:[port] to proxy to") | ||
16 | ) | 17 | ) |
17 | 18 | ||
18 | func main() { | 19 | func main() { |
19 | flag.Parse() | 20 | flag.Parse() |
20 | 21 | ||
21 | // Use a config struct | 22 | // Use a config struct |
22 | log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *uri)) | 23 | log.Fatal(gopherproxy.ListenAndServe(*bind, *robotsfile, *robotsdebug, *uri)) |
23 | } | 24 | } |