commit 9595b1c0ad254160c036d535894d46964e0cb98f Author: David Fifield david@bamsoftware.com Date: Thu May 30 14:35:35 2013 -0700
Add usage to websocket-client. --- websocket-transport/websocket-client.go | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/websocket-transport/websocket-client.go b/websocket-transport/websocket-client.go index 129e90a..7e399e3 100644 --- a/websocket-transport/websocket-client.go +++ b/websocket-transport/websocket-client.go @@ -25,6 +25,15 @@ const bufSiz = 1500 // ends, -1 is written. var handlerChan = make(chan int)
+func usage() { + fmt.Printf("Usage: %s [OPTIONS]\n", os.Args[0]) + fmt.Printf("WebSocket client pluggable transport for Tor.\n") + fmt.Printf("Works only as a managed proxy.\n") + fmt.Printf("\n") + fmt.Printf(" -h, --help show this help.\n") + fmt.Printf(" --socks ADDR listen for SOCKS on ADDR.\n") +} + func logDebug(format string, v ...interface{}) { fmt.Fprintf(os.Stderr, format+"\n", v...) } @@ -168,6 +177,7 @@ func main() { var socksAddrStrs []string
var socksArg = flag.String("socks", "", "address on which to listen for SOCKS connections") + flag.Usage = usage flag.Parse() if *socksArg != "" { socksAddrStrs = []string{*socksArg}
tor-commits@lists.torproject.org