[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit abeea884f554b4119ebd84974c612c0dca6ce941
Author: David Fifield <david@xxxxxxxxxxxxxxx>
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

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits