[tor-commits] [flashproxy/master] Tag struct literal fields.

dcf at torproject.org dcf at torproject.org
Sat May 11 23:03:01 UTC 2013


commit 6e3983eb90dc699a2d331761bfda4c54dc358dbd
Author: David Fifield <david at bamsoftware.com>
Date:   Sat May 11 16:02:32 2013 -0700

    Tag struct literal fields.
    
    Suggested by "go vet".
    socks.go:97:17: net.TCPAddr struct literal uses untagged fields
---
 websocket-transport/socks.go |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/websocket-transport/socks.go b/websocket-transport/socks.go
index a2f525c..94732a0 100644
--- a/websocket-transport/socks.go
+++ b/websocket-transport/socks.go
@@ -94,7 +94,7 @@ func SendSocks4aResponse(w io.Writer, code byte, addr *net.TCPAddr) error {
 	return err
 }
 
-var emptyAddr = net.TCPAddr{net.IPv4(0, 0, 0, 0), 0}
+var emptyAddr = net.TCPAddr{IP = net.IPv4(0, 0, 0, 0), Port = 0}
 
 // Send a SOCKS4a response code 0x5a.
 func SendSocks4aResponseGranted(w io.Writer, addr *net.TCPAddr) error {



More information about the tor-commits mailing list