[tor-commits] [snowflake/master] Move flag code out of init into main.
dcf at torproject.org
dcf at torproject.org
Thu Aug 3 02:35:44 UTC 2017
commit eaa82b8f9a0d3bafe32062ececbd4f8473bfcf86
Author: David Fifield <david at bamsoftware.com>
Date: Fri Jul 14 20:00:25 2017 -0700
Move flag code out of init into main.
---
broker/broker.go | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/broker/broker.go b/broker/broker.go
index ee6f509..e3aecb1 100644
--- a/broker/broker.go
+++ b/broker/broker.go
@@ -229,9 +229,9 @@ func ipHandler(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(remoteAddr))
}
-var cert, cert_key, http_port, https_port string
+func main() {
+ var cert, cert_key, http_port, https_port string
-func init() {
flag.StringVar(&cert, "cert", "", "TLS certificate file")
flag.StringVar(&cert_key, "key", "", "TLS key file")
@@ -250,9 +250,6 @@ func init() {
log.Println("Using cert file:", cert)
log.Println("Using cert key file: ", cert_key)
-}
-
-func main() {
ctx := NewBrokerContext()
More information about the tor-commits
mailing list