diff options
author | James Mills <prologic@shortcircuit.net.au> | 2016-09-30 19:40:24 -0700 |
---|---|---|
committer | James Mills <prologic@shortcircuit.net.au> | 2016-09-30 19:40:24 -0700 |
commit | c51b6d8887c38d538c0e2db2adfe0848fc662986 (patch) | |
tree | bc010e879a8e399d95371142c3298e37dabbdffb /cmd | |
parent | Explicitly set font-family to Monospace (diff) | |
download | gopherproxy-c51b6d8887c38d538c0e2db2adfe0848fc662986.tar.gz gopherproxy-c51b6d8887c38d538c0e2db2adfe0848fc662986.tar.bz2 gopherproxy-c51b6d8887c38d538c0e2db2adfe0848fc662986.zip |
Migrated to a Library structure with gopherproxy cmd for reuse by gopherclient
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gopherproxy/main.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmd/gopherproxy/main.go b/cmd/gopherproxy/main.go new file mode 100644 index 0000000..bc5050e --- /dev/null +++ b/cmd/gopherproxy/main.go | |||
@@ -0,0 +1,19 @@ | |||
1 | package main | ||
2 | |||
3 | import ( | ||
4 | "flag" | ||
5 | "log" | ||
6 | |||
7 | "github.com/prologic/gopherproxy" | ||
8 | ) | ||
9 | |||
10 | var ( | ||
11 | bind = flag.String("bind", ":80", "[int]:port to bind to") | ||
12 | uri = flag.String("uri", "127.0.0.1:70", "<host>:[port] to proxy to") | ||
13 | ) | ||
14 | |||
15 | func main() { | ||
16 | flag.Parse() | ||
17 | |||
18 | log.Fatal(gopherproxy.ListenAndServe(*bind, *uri)) | ||
19 | } | ||