[tor-commits] [goptlib/master] Compatibility with go 1.0.3.

dcf at torproject.org dcf at torproject.org
Mon Jan 27 06:20:34 UTC 2014


commit abeea884f554b4119ebd84974c612c0dca6ce941
Author: David Fifield <david at bamsoftware.com>
Date:   Sun Jan 26 22:19:36 2014 -0800

    Compatibility with go 1.0.3.
    
    The older go doesn't detect that all paths lead to a return statement.
    
    src/git.torproject.org/pluggable-transports/goptlib.git/pt.go:328: function ends without a return statement
---
 pt.go |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pt.go b/pt.go
index 181097e..1e85f8d 100644
--- a/pt.go
+++ b/pt.go
@@ -332,9 +332,8 @@ func getClientTransports(star []string) ([]string, error) {
 	}
 	if clientTransports == "*" {
 		return star, nil
-	} else {
-		return strings.Split(clientTransports, ","), nil
 	}
+	return strings.Split(clientTransports, ","), nil
 }
 
 // This structure is returned by ClientSetup. It consists of a list of method



More information about the tor-commits mailing list