Remove unused func.

This commit is contained in:
Vladimir Mihailenco 2015-04-07 12:30:57 +03:00
parent 2511a1791d
commit dbfd75705c
1 changed files with 0 additions and 15 deletions

View File

@ -8,20 +8,6 @@ import (
"time" "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 { type ClusterClient struct {
commandable commandable
@ -285,7 +271,6 @@ func (opt *ClusterOptions) getMaxRedirects() int {
} }
func (opt *ClusterOptions) getAddrs() []string { func (opt *ClusterOptions) getAddrs() []string {
opt.Addrs = removeDuplicates(opt.Addrs)
return opt.Addrs return opt.Addrs
} }