From dbfd75705c3a57fc256bad0b4e8cfb121aa6a6fd Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 7 Apr 2015 12:30:57 +0300 Subject: [PATCH] Remove unused func. --- cluster.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/cluster.go b/cluster.go index 8790e12..b68c60f 100644 --- a/cluster.go +++ b/cluster.go @@ -8,20 +8,6 @@ import ( "time" ) -func removeDuplicates(slice []string) []string { - seen := make(map[string]struct{}, len(slice)) - for i := 0; i < len(slice); { - addr := slice[i] - if _, ok := seen[addr]; ok { - slice = append(slice[:i], slice[i+1:]...) - } else { - seen[addr] = struct{}{} - i++ - } - } - return slice -} - type ClusterClient struct { commandable @@ -285,7 +271,6 @@ func (opt *ClusterOptions) getMaxRedirects() int { } func (opt *ClusterOptions) getAddrs() []string { - opt.Addrs = removeDuplicates(opt.Addrs) return opt.Addrs }