diff --git a/mongo/address/addr.go b/mongo/address/addr.go index fb6abbcd7c..94f2fa0ba2 100644 --- a/mongo/address/addr.go +++ b/mongo/address/addr.go @@ -29,8 +29,7 @@ func (a Address) Network() string { // String is the canonical version of this address, e.g. localhost:27017, // 1.2.3.4:27017, example.com:27017. func (a Address) String() string { - // TODO: unicode case folding? - s := strings.ToLower(string(a)) + s := string(a) if len(s) == 0 { return "" } diff --git a/mongo/address/addr_test.go b/mongo/address/addr_test.go index 2242b6d49c..aeb2560500 100644 --- a/mongo/address/addr_test.go +++ b/mongo/address/addr_test.go @@ -18,8 +18,8 @@ func TestAddress_String(t *testing.T) { expected string }{ {"a", "a:27017"}, - {"A", "a:27017"}, - {"A:27017", "a:27017"}, + {"A", "A:27017"}, + {"A:27017", "A:27017"}, {"a:27017", "a:27017"}, {"a.sock", "a.sock"}, } @@ -37,8 +37,8 @@ func TestAddress_Canonicalize(t *testing.T) { expected string }{ {"a", "a:27017"}, - {"A", "a:27017"}, - {"A:27017", "a:27017"}, + {"A", "A:27017"}, + {"A:27017", "A:27017"}, {"a:27017", "a:27017"}, {"a.sock", "a.sock"}, }