aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorJames Mills <prologic@shortcircuit.net.au>2016-09-30 19:40:24 -0700
committerJames Mills <prologic@shortcircuit.net.au>2016-09-30 19:40:24 -0700
commitc51b6d8887c38d538c0e2db2adfe0848fc662986 (patch)
treebc010e879a8e399d95371142c3298e37dabbdffb /cmd
parentExplicitly set font-family to Monospace (diff)
downloadgopherproxy-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.go19
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 @@
1package main
2
3import (
4 "flag"
5 "log"
6
7 "github.com/prologic/gopherproxy"
8)
9
10var (
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
15func main() {
16 flag.Parse()
17
18 log.Fatal(gopherproxy.ListenAndServe(*bind, *uri))
19}