[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Tweak command line parsing a bit.
commit e4f3ced2ffc1ef9a7556110d128d36dba85f2259
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date: Thu May 30 15:04:40 2013 -0700
Tweak command line parsing a bit.
---
websocket-transport/websocket-client.go | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/websocket-transport/websocket-client.go b/websocket-transport/websocket-client.go
index acca651..15b70dc 100644
--- a/websocket-transport/websocket-client.go
+++ b/websocket-transport/websocket-client.go
@@ -182,13 +182,13 @@ func startListener(addrStr string) (*net.TCPListener, error) {
}
func main() {
- var defaultSocksAddrStrs = []string{"127.0.0.1:0"}
- var socksAddrStrs []string
var logFilename string
+ var socksAddrStrs = []string{"127.0.0.1:0"}
+ var socksArg string
- var socksArg = flag.String("socks", "", "address on which to listen for SOCKS connections")
flag.Usage = usage
flag.StringVar(&logFilename, "log", "", "log file to write to")
+ flag.StringVar(&socksArg, "socks", "", "address on which to listen for SOCKS connections")
flag.Parse()
if logFilename != "" {
@@ -200,10 +200,8 @@ func main() {
logFile = f
}
- if *socksArg != "" {
- socksAddrStrs = []string{*socksArg}
- } else {
- socksAddrStrs = defaultSocksAddrStrs
+ if socksArg != "" {
+ socksAddrStrs = []string{socksArg}
}
Log("starting")
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits